Reputation: 23
Newbie here learning Swift and tweaking a VisionOS app.
I am following Apple documentation to specify an initial window size. I have the following code in my ContentView.swift file:
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
.defaultSize(CGSize(width: 600, height: 400))
}
}
When I build the project, I get the following 2 errors:
Any tips on how I can resolve these?
Thank you.
Upvotes: 2
Views: 1112
Reputation: 29383
Change
var body: some Scene {
To
var body: some SwiftUI.Scene {
Upvotes: 3