Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 1cc6449

Browse files
[FIX] iOS registerForRemoteNotifications() Now Runs on Main Thread #515
1 parent 508280c commit 1cc6449

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firebase.ios.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ firebase._registerForRemoteNotifications = function () {
356356
app = utils.ios.getter(UIApplication, UIApplication.sharedApplication);
357357
}
358358
if (app !== null) {
359-
invokeOnRunLoop(() => {
359+
invokeOnRunLoop(function () {
360360
app.registerForRemoteNotifications();
361361
});
362362
}
@@ -403,7 +403,7 @@ firebase._registerForRemoteNotifications = function () {
403403
} else {
404404
var notificationTypes = UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationActivationModeBackground;
405405
var notificationSettings = UIUserNotificationSettings.settingsForTypesCategories(notificationTypes, null);
406-
invokeOnRunLoop(() => {
406+
invokeOnRunLoop(function () {
407407
app.registerForRemoteNotifications(); // prompts the user to accept notifications
408408
});
409409
app.registerUserNotificationSettings(notificationSettings);

0 commit comments

Comments
 (0)