<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/App/body-swift.property",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI3AppP4body4BodyQzvp"
  },
  "title" : "body"
}
-->

# body

The content and behavior of the app.

```
@SceneBuilder @MainActor @preconcurrency var body: Self.Body { get }
```

## Discussion

For any app that you create, provide a computed `body` property that
defines your app’s scenes, which are instances that conform to the
[`Scene`](/documentation/SwiftUI/Scene) protocol. For example, you can create a simple app
with a single scene containing a single view:

```
@main
struct MyApp: App {
    var body: some Scene {
        WindowGroup {
            Text("Hello, world!")
        }
    }
}
```

Swift infers the app’s [`Body`](/documentation/SwiftUI/App/Body-swift.associatedtype)
associated type based on the scene provided by the `body` property.

---

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)