---
title: "init(id:makeContent:)"
framework: swiftui
role: symbol
role_heading: Initializer
path: "swiftui/immersivespace/init(id:makecontent:)"
---

# init(id:makeContent:)

Creates the immersive space associated with the specified identifier.

## Declaration

```swift
nonisolated init(id: String, @ImmersiveSpaceContentBuilder makeContent: @escaping () -> Content) where Data == Never
```

## Parameters

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

## Discussion

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