LockedCameraCaptureExtension how to debug?

I am building a LockedCameraCaptureExtension for my app. The example code works as expected. I am now in the process of porting my existing camera UI to the LockedCameraCaptureExtension.

Currently, my custom UI is shown for a split second when I tap the control to open the LockedCameraCaptureExtension but it quickly exits back into Lock Screen. I assume my ported UI is doing something wrong.

What is the recommended way to debug a LockedCameraCaptureExtension? I can't get my break points to break and os_log does not seem to log anything to Console.

Specifically, the crash reports on device say:

Exception Type:  EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: RUNNINGBOARD 0 

and the stack trace is all system code. It seems like my extension is getting terminated for some reason but I don't know why.

os_log messages not showing for Capture Extensions is a known problem. Check the release notes for Xcode 16:

https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes

Stay tuned on that front!

I dug around and found this in Console:

[xpcservice<com.fifteenjugglers.solarwatch.SolarARCamera([osservice<com.apple.SpringBoard>:34])>{vt hash: 120182604}:2718] Terminating with context: <RBSTerminateContext| explanation:LockedContentServices deleting contents of extension data container reportType:None maxTerminationResistance:Interactive attrs:[
	<RBSPreventLaunchLimitation| <RBSProcessPredicate <RBSProcessBundleIdentifierPredicate "com.fifteenjugglers.solarwatch.SolarARCamera">> allow:(null)>
	]>

Also it seems like the UI loads correctly if I remove the ARSCNView which renders the solar path from my camera UI.

As far as why your extension might be crashing, I think I'd start with trying to run the capture extension as an app. Try just taking whatever you're doing and put it into an app-style target, and run it that way.

If your crash is specific to running it as a capture extension, make sure to review the locked down requirements of Capture Extensions. If it's crashing quickly, perhaps you might be trying to present unsupported UI like a Share Sheet?

Edit: I see your response. I don't believe SceneKit works at this time in Capture Extensions. File a Feedback with your use case if you want that to be considered!

LockedCameraCaptureExtension how to debug?
 
 
Q