File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ import MockKit
1515import HealthKit
1616import WidgetKit
1717
18+ #if targetEnvironment(simulator)
19+ enum SimulatorError : Error {
20+ case remoteNotificationsNotAvailable
21+ }
22+ #endif
23+
1824public protocol AlertPresenter : AnyObject {
1925 /// Present the alert view controller, with or without animation.
2026 /// - Parameters:
@@ -102,10 +108,13 @@ class LoopAppManager: NSObject {
102108
103109 if FeatureFlags . remoteOverridesEnabled {
104110 DispatchQueue . main. async {
111+ #if targetEnvironment(simulator)
112+ self . remoteNotificationRegistrationDidFinish ( . failure( SimulatorError . remoteNotificationsNotAvailable) )
113+ #else
105114 UIApplication . shared. registerForRemoteNotifications ( )
115+ #endif
106116 }
107117 }
108-
109118 self . state = state. next
110119 }
111120
You can’t perform that action at this time.
0 commit comments