Commit 2ced2d04 authored by Libin Lu's avatar Libin Lu Committed by GitHub

Merge pull request #575 from opencollector/moriyoshi/registerForRemoteNotifications-on-main-thread

Dispatch registerForRemoteNotifications on main thread to prevent runtime warnings 
parents d9f215f3 a2412b8e
...@@ -293,7 +293,9 @@ RCT_EXPORT_METHOD(requestPermissions:(RCTPromiseResolveBlock)resolve rejecter:(R ...@@ -293,7 +293,9 @@ RCT_EXPORT_METHOD(requestPermissions:(RCTPromiseResolveBlock)resolve rejecter:(R
#endif #endif
} }
dispatch_async(dispatch_get_main_queue(), ^{
[[UIApplication sharedApplication] registerForRemoteNotifications]; [[UIApplication sharedApplication] registerForRemoteNotifications];
});
} }
RCT_EXPORT_METHOD(subscribeToTopic: (NSString*) topic) RCT_EXPORT_METHOD(subscribeToTopic: (NSString*) topic)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment