<!--
{
  "availability" : [
    "macOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/RemoteImmersiveSpace/init(id:content:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20RemoteImmersiveSpaceV2id7contentACyAA24CompositorContentBuilderV0I0Vy_qd__Gs5NeverOGSS_qd__yctcAJRszALRs_AA0hI0Rd__lufc"
  },
  "title" : "init(id:content:)"
}
-->

# init(id:content:)

Creates the remote immersive space associated with the specified
identifier.

```
nonisolated init<C>(id: String, @CompositorContentBuilder content: @escaping () -> C) where Content == CompositorContentBuilder.Content<C>, Data == Never, C : CompositorContent
```

## Parameters

`id`

A string that uniquely identifies the immersive space. Ensure
that identifiers are unique among the immersive spaces in your app.

`content`

An compositor content builder that defines the content
of the space.

## Discussion

The space uses the specified content builder to form the content.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)