Merge pull request #413 from akshetpandey/fixUIKitBug
UIApplication methods should only be called from the main thread
This commit is contained in:
commit
614a61eeb7
|
@ -16,7 +16,9 @@ RCT_EXPORT_METHOD(setAnalyticsCollectionEnabled:(BOOL) enabled) {
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setCurrentScreen:(NSString *) screenName screenClass:(NSString *) screenClassOverriew) {
|
RCT_EXPORT_METHOD(setCurrentScreen:(NSString *) screenName screenClass:(NSString *) screenClassOverriew) {
|
||||||
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setUserId: (NSString *) id) {
|
RCT_EXPORT_METHOD(setUserId: (NSString *) id) {
|
||||||
|
|
|
@ -386,7 +386,9 @@ RCT_EXPORT_METHOD(getScheduledLocalNotifications:(RCTPromiseResolveBlock)resolve
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(setBadgeNumber: (NSInteger*) number) {
|
RCT_EXPORT_METHOD(setBadgeNumber: (NSInteger*) number) {
|
||||||
[RCTSharedApplication() setApplicationIconBadgeNumber:number];
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
|
[RCTSharedApplication() setApplicationIconBadgeNumber:number];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
RCT_EXPORT_METHOD(getBadgeNumber: (RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject) {
|
||||||
|
|
Loading…
Reference in New Issue