fixes races bug in react-native > 0.52
This commit is contained in:
parent
90d35ef6e9
commit
9c4deb541a
|
@ -5,6 +5,7 @@
|
|||
#import <FirebaseAnalytics/FIRAnalyticsConfiguration.h>
|
||||
|
||||
@implementation RNFirebaseAnalytics
|
||||
@synthesize methodQueue = _methodQueue;
|
||||
RCT_EXPORT_MODULE();
|
||||
|
||||
RCT_EXPORT_METHOD(logEvent:(NSString *)name props:(NSDictionary *)props) {
|
||||
|
@ -16,7 +17,7 @@ RCT_EXPORT_METHOD(setAnalyticsCollectionEnabled:(BOOL) enabled) {
|
|||
}
|
||||
|
||||
RCT_EXPORT_METHOD(setCurrentScreen:(NSString *) screenName screenClass:(NSString *) screenClassOverriew) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
[FIRAnalytics setScreenName:screenName screenClass:screenClassOverriew];
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue