forked from fechanique/cordova-plugin-fcm
-
-
Notifications
You must be signed in to change notification settings - Fork 276
Open
Description
Describe the bug
clearAllNotifications method is attempting to modify the user interface from a background thread. This operation should only be performed on the main thread.
src/ios/FCMPlugin.m - line 98
[[UIApplication sharedApplication] setApplicationIconBadgeNumber:0];
// Ensure UI updates are made on the main thread
dispatch_async(dispatch_get_main_queue(), ^{ [[UIApplication sharedApplication] setApplicationIconBadgeNumber:0]; });
• The dispatch_async(dispatch_get_main_queue(), ^{...}); block ensures that setApplicationIconBadgeNumber: is called on the main thread.
• The rest of the code, including logging and sending the plugin result, runs in the background.
Metadata
Metadata
Assignees
Labels
No labels