Fiw boot on macOS 14

This commit is contained in:
Thomas Ricouard 2024-09-13 10:08:38 +02:00
parent 7b67ba0294
commit 24f8982bd4
1 changed files with 15 additions and 5 deletions

View File

@ -57,11 +57,6 @@ extension IceCubesApp {
}
.withModelContainer()
}
#if targetEnvironment(macCatalyst)
.windowResizability(.contentSize)
#elseif os(visionOS)
.defaultSize(width: 800, height: 1200)
#endif
.commands {
appMenu
}
@ -74,6 +69,11 @@ extension IceCubesApp {
watcher.watch(streams: [.user, .direct])
}
}
#if targetEnvironment(macCatalyst)
.windowResize()
#elseif os(visionOS)
.defaultSize(width: 800, height: 1200)
#endif
}
@SceneBuilder
@ -146,3 +146,13 @@ extension IceCubesApp {
}
}
}
extension Scene {
func windowResize() -> some Scene {
if #available(iOS 18.0, *) {
return self.windowResizability(.contentSize)
} else {
return self.defaultSize(width: 1100, height: 1400)
}
}
}