38 lines
424 B
Markdown
38 lines
424 B
Markdown
**PROTOCOL**
|
|
|
|
# `App`
|
|
|
|
A structure conforming to `App` is the entry point of your app.
|
|
|
|
```swift
|
|
@main
|
|
struct Test: App {
|
|
|
|
let id = "io.github.david-swift.TestApp"
|
|
var app: GTUIApp!
|
|
|
|
var scene: Scene {
|
|
WindowScene()
|
|
}
|
|
|
|
}
|
|
```
|
|
|
|
## Properties
|
|
### `id`
|
|
|
|
The app's application ID.
|
|
|
|
### `scene`
|
|
|
|
The app's windows.
|
|
|
|
### `app`
|
|
|
|
The app.
|
|
|
|
## Methods
|
|
### `init()`
|
|
|
|
An app has to have an `init()` initializer.
|