You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
iOS: perf target resolves to an app extension (.appex) pid instead of the app process #5155
On iOS, perf target resolution can pick the pid of an app extension (*.appex) instead of the app process when the app bundle ships extensions. The capture then targets the wrong process.
Environment
macOS 27.2.1
Xcode 27.0 (27A266a)
iPhone 16 Pro Max, physical, USB, unlocked, Developer Mode on (OS build 24B156)
agent-device 0.21.33 and 0.21.44
App: React Native dev-client build that ships an app extension (LiveActivityExtension.appex)
Reproduction
xcrun devicectl device info processes --device <udid> lists:
10089 …/App.app/App # prod app (com.example.app)
10870 …/App.app/App # dev app (com.example.app-dev), the target
10844 …/App.app/PlugIns/LiveActivityExtension.appex/LiveActivityExtension
perf cpu profile stop --kind xctrace
COMMAND_FAILED: … Cannot find process for provided pid: 10844
pid 10844 is the Live Activity extension, not the app (10870). The --attach failure itself is a separate toolchain problem, reported in a companion issue. The point here is that the wrong pid was chosen.
The perf target resolves to the app process only, here 10870 (…/App.app/App). Extension processes are not matched.
Suggested fix
Match the process executable path to <App>.app/<CFBundleExecutable> exactly. Exclude processes under PlugIns/*.appex.
Notes
Several installed apps can share an executable name. Here prod and dev are both …/App.app/App. Matching by bundle id or path, rather than by name, would also avoid picking the wrong app.
Triage: bug. perf memory sample and xctrace share CoreDevice target resolution, so the app and nested extension can both enter the target set. The fix should select the running executable for the requested bundle, with a regression fixture that includes a second installed copy and a nested extension. The Xcode attach failure is tracked separately in #5154.
Activity
thymikee commentedon Nov 28, 2026
Triage: bug.
perf memory sampleand xctrace share CoreDevice target resolution, so the app and nested extension can both enter the target set. The fix should select the running executable for the requested bundle, with a regression fixture that includes a second installed copy and a nested extension. The Xcode attach failure is tracked separately in #5154.