ui fixes
This commit is contained in:
parent
507ae52e9c
commit
84a41432c5
2 changed files with 29 additions and 5 deletions
|
|
@ -100,20 +100,25 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
|||
struct NavidromePlayerApp: App {
|
||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
|
||||
@StateObject private var serverManager = ServerManager.shared
|
||||
@StateObject private var audioPlayer = AudioPlayer.shared
|
||||
@StateObject private var offlineManager = OfflineManager.shared
|
||||
|
||||
// Initialize WatchConnectivity so sync works immediately
|
||||
private let watchConnectivity = WatchConnectivityManager.shared
|
||||
|
||||
init() {
|
||||
// Dismiss keyboard when scrolling any scroll view
|
||||
UIScrollView.appearance().keyboardDismissMode = .interactive
|
||||
}
|
||||
|
||||
var body: some Scene {
|
||||
// NavidromeSceneDelegate owns the UIWindow and RootView entirely.
|
||||
// WindowGroup must exist to satisfy the @main App protocol, but must
|
||||
// NOT render RootView again — that would create a second UIWindow on
|
||||
// top of the delegate's window, causing safe-area/scaling bugs app-wide.
|
||||
WindowGroup {
|
||||
Color.clear.frame(width: 0, height: 0)
|
||||
RootView()
|
||||
.environmentObject(serverManager)
|
||||
.environmentObject(audioPlayer)
|
||||
.environmentObject(offlineManager)
|
||||
.tint(Color(red: 1.0, green: 0.176, blue: 0.333))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,22 +22,38 @@
|
|||
<string>1</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
|
||||
<!-- Plist-based launch screen — no storyboard file required.
|
||||
Empty dict = system background colour. Silences the Xcode warning
|
||||
and guarantees the window is sized full-screen from first launch. -->
|
||||
<key>UILaunchScreen</key>
|
||||
<dict/>
|
||||
|
||||
<!-- Full-screen only — disables iPad Slide Over / Split View.
|
||||
Also satisfies the "requires full screen" exception so no
|
||||
launch storyboard is needed. -->
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<true/>
|
||||
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
<string>fetch</string>
|
||||
<string>processing</string>
|
||||
</array>
|
||||
|
||||
<key>BGTaskSchedulerPermittedIdentifiers</key>
|
||||
<array>
|
||||
<string>com.navidromeplayer.smartdj.refresh</string>
|
||||
<string>com.navidromeplayer.library.sync</string>
|
||||
</array>
|
||||
|
||||
<key>UIApplicationSceneManifest</key>
|
||||
<dict>
|
||||
<key>UIApplicationSupportsMultipleScenes</key>
|
||||
<false/>
|
||||
</dict>
|
||||
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
|
|
@ -52,13 +68,16 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
|
||||
<key>NSAppTransportSecurity</key>
|
||||
<dict>
|
||||
<key>NSAllowsArbitraryLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Choose a cover image for your radio stations.</string>
|
||||
<key>NSMicrophoneUsageDescription</key>
|
||||
|
|
|
|||
Loading…
Reference in a new issue