import Foundation /// This phone's push token (#433). ipx sends the icon's count to it while the app is closed, /// which background refresh only guessed at. The page registers it with ipx, signed in as the /// page is, since the player's address lets through only the player's own paths. @MainActor enum Push { /// Told when the token arrives or changes, to pass it to the page. static var onToken: ((String) -> Void)? static var token: String? { didSet { if let token, token != oldValue { onToken?(token) } } } /// A debug build is served by Apple's sandbox, which ipx has to send to instead. static var sandbox: Bool { #if DEBUG true #else false #endif } }