We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ed81a1 commit 4932bd5Copy full SHA for 4932bd5
Sources/AmplifyUtilsNotifications/AUNotificationPermissions.swift
@@ -44,11 +44,13 @@ public class AUNotificationPermissions {
44
options: options
45
)
46
47
- if notificationsAllowed {
48
- // Register with Apple Push Notification service
49
- await Application.shared.registerForRemoteNotifications()
50
- }
51
-
52
return notificationsAllowed
53
}
+
+ /// Register device with APNs
+ public static func registerForRemoteNotifications() async {
+ await MainActor.run {
+ Application.shared.registerForRemoteNotifications()
54
+ }
55
56
0 commit comments