An object that can request to open the extension's containing app and receives session configuration
updates.
Provided during the initialization of the
<doc:LockedCameraCapture/LockedCameraCaptureExtensionScene>. Only the system can
initialize this object.
Members (3)
method · iOS 18.0+
invalidateSessionContent
TypeScript
invalidateSessionContent(): Promise<void>
Swift declaration
final func invalidateSessionContent() async throws
Invalidates the contents of the session contents URL, deleting them. Note this does not remove the contents directory itself. This is useful in case the extension has already ingested its contents via PhotoKit and wishes to not persist any data (but can still use this directory as a working directory to recover from an unexpected termination).
final func openApplication(for userActivity: NSUserActivity) async throws
Initiates a request to open the extension's containing app.
The system requests authentication before opening the app, if needed.
- Parameter userActivity: An `NSUserActivity` that contains relevant information
to benefit from universal link support. Use the
<doc:NSUserActivityTypeLockedCameraCapture> activity type to indicate when the app
launches from a locked camera capture extension.
get · iOS 18.0+
sessionContentURL
TypeScript
get sessionContentURL(): string
Swift declaration
final var sessionContentURL: URL { get }
A temporary directory URL inside the extension's data container.
Store captured content during the current `LockedCameraCaptureSession` to this `URL`.
The system copies the contents of this directory to the extension's containing app's data container
when the extension is suspended. The extension's data container is erased once the
system finishes copying the contents. Store all data that needs to be persisted past the lifetime of
the extension process to this directory.