I'm using the LockedCameraCaptureExtension to launch my Camera app from the camera button. Some of our users report our app crashing a few seconds after being launch from the camera button.
The call stack is something inside BoardServices [BSServicesConfiguration activateXPCService]
I'm not sure how to investigate or fix this, anyone else having the same issue?
Basically in my LockedCameraCaptureExtension when it loads I just call openApplication on the LockedCameraCaptureSession to launch into my app.
@main
struct captureExtension: LockedCameraCaptureExtension {
var body: some LockedCameraCaptureExtensionScene {
LockedCameraCaptureUIScene { session in
Button(action: {
Task {
await openCamera(session: session)
}
}, label: {
Text("Open Camera")
})
.buttonStyle(PlainButtonStyle())
.task {
await openCamera(session: session)
}
}
}
private func openCamera(session: LockedCameraCaptureSession) async {
try? await session.openApplication(for: NSUserActivity(activityType: "com.mycompany.camera"))
}
}