Contents

callAsFunction(foveatedStreaming:)

Presents the immersive space that your app defines for the specified foveated streaming session.

Declaration

@discardableResult @MainActor func callAsFunction(foveatedStreaming session: FoveatedStreamingSession) async -> OpenImmersiveSpaceAction.Result

Parameters

  • session:

    The foveated streaming session associated with the immersive space to present.

Discussion

Don’t call this method directly. SwiftUI calls it when you call the <doc://com.apple.documentation/documentation/swiftui/environmentvalues/openimmersivespace> action with a foveated streaming session:

await openImmersiveSpace(foveatedStreaming: session)

For information about how Swift uses the callAsFunction() method to simplify call site syntax, see Methods with Special Names in The Swift Programming Language.