I am trying to perform swiftUI instrumentation on my ios app. whenever i hit the rocord button, the app launches on target device and closes with the error:
Failed to start the recording: Failed starting ktrace session.
How do i resolve this please?
Some questions.
- By "SwiftUI instrumentation", do you mean profile your app in Instruments with the SwiftUI instrument?
- What version of Xcode are you running?
- What version of iOS is the device running?
The new SwiftUI instrument Apple added in Xcode 26 requires iOS 26+. If your device is running an earlier version of iOS, you can't use the new SwiftUI instrument.
If you can't use the new SwiftUI instrument in Xcode 26, click the Add Instrument button above the timeline pane graphs and add the legacy View Body and View Properties instruments to profile the app. Also, remove the SwiftUI instrument from the trace.