How to declare protocol ?

Code Block
//
//  GegeApp.swift
//  Gege
//
//  Created by Besleaga Alexandru Marian on 5/15/21.
import SwiftUI
@main
struct GegeApp: App {
    var body: some Scene {
        WindowGroup {
            Text("Hello, world!")
        }
    }
}

How do I declare protocol App in context ?

How do I declare protocol App in context ?

The protocol App is defined in the framework SwiftUI, which is not something you need to define.
Do you get any sort of errors with your shown code?
No need to redeclare.

Here is the Apple example:
Code Block
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
#if os(macOS)
Settings {
SettingsView()
}
#endif
}
}

How to declare protocol ?
 
 
Q