Post

Replies

Boosts

Views

Activity

Reply to WatchOS Notifications Firing Late
iOS decides if to forward the notification to a >connected watch< based on a number of factors such as does the watch have it's own token in order to get messages directly etc. https://developer.apple.com/documentation/watchos-apps/taking-advantage-of-notification-forwarding?changes=_9 https://developer.apple.com/documentation/watchos-apps/notifications?changes=_9 https://developer.apple.com/documentation/watchos-apps/enabling-and-receiving-notifications?changes=_9
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’23
Reply to Is there an API to get the iOS Rapid Security Response version?
Here you go: May the 9th be with you! Getting the suffix information is walled by private APIs. The only way to get it is to use the string version of process info and probably perform a regex to extract and other string fun stuff. Sean! import Foundation class VersionModel: ObservableObject { init() {} @Published var value: String = { let process = ProcessInfo.processInfo.operatingSystemVersionString return process }() } import SwiftUI struct ContentView: View { @EnvironmentObject var model: VersionModel var body: some View { VStack { Image(systemName: "globe") .imageScale(.large) .foregroundColor(.accentColor) Text("Version \(model.value)!") } .padding() } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() .environmentObject(VersionModel()) } } import SwiftUI @main struct VersionInfoApp: App { @StateObject var model = VersionModel() var body: some Scene { WindowGroup { ContentView() .environmentObject(model) } } }
Topic: Programming Languages SubTopic: Swift Tags:
May ’23