XR
Manage Immersive Experiences.
Methods
requestSession
requestSession: (sessionId: string, userInfo?: Object) => Promise<void>
Opens a new ImmersiveSpace given it's unique Id. Can also accept userInfo object that get's passed to the SwiftUI view, checkout use SwiftUI to render windows to learn more.
warning
Opening an ImmersiveSpace can fail in following scenarios:
ImmersiveSpaceis not declared.UIApplicationSupportsMultipleScenesis set tofalse.- User cancels the request.
endSession
endSession: () => Promise<void>
Closes currently open ImmersiveSpace.
warning
Make sure to set UIApplicationSupportsMultipleScenes to true in Info.plist as described here.