Files
ios/MusicBridge/MusicBridgeApp.swift
T

17 lines
477 B
Swift
Raw Normal View History

2026-09-10 09:11:55 +03:00
import SwiftUI
@main
struct MusicBridgeApp: App {
@StateObject private var store = PlayerStore()
@Environment(\.scenePhase) private var phase
var body: some Scene {
WindowGroup {
ContentView(store: store)
.onOpenURL { store.importInvitation($0.absoluteString) }
2026-09-10 09:11:55 +03:00
.task { store.setActive(phase == .active) }
.onChange(of: phase) { _, value in store.setActive(value == .active) }
}
}
}