[messaging][ios] registerForRemoteNotification on main thread

This commit is contained in:
Chris Bianca 2017-10-24 09:51:21 +01:00
parent 403a7eefa0
commit ff8a8676d6
1 changed files with 3 additions and 1 deletions

View File

@ -297,7 +297,9 @@ RCT_EXPORT_METHOD(requestPermissions:(RCTPromiseResolveBlock)resolve rejecter:(R
#endif
}
[RCTSharedApplication() registerForRemoteNotifications];
dispatch_async(dispatch_get_main_queue(), ^{
[RCTSharedApplication() registerForRemoteNotifications];
});
}
RCT_EXPORT_METHOD(subscribeToTopic: (NSString*) topic) {