|
@@ -40,8 +40,6 @@
|
40
|
40
|
{
|
41
|
41
|
self.eventEmitter = [RNNEventEmitter new];
|
42
|
42
|
|
43
|
|
- self.store = [RNNStore new];
|
44
|
|
-
|
45
|
43
|
UIApplication.sharedApplication.delegate.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
46
|
44
|
UIApplication.sharedApplication.delegate.window.backgroundColor = [UIColor whiteColor];
|
47
|
45
|
|
|
@@ -59,11 +57,7 @@
|
59
|
57
|
-(void)registerForJsEvents
|
60
|
58
|
{
|
61
|
59
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJavaScriptLoaded) name:RCTJavaScriptDidLoadNotification object:self.bridge];
|
62
|
|
-
|
63
|
|
-#pragma GCC diagnostic push
|
64
|
|
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
65
|
|
-// [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJavaScriptDevReload) name:RCTReloadNotification object:self.bridge];
|
66
|
|
-#pragma GCC diagnostic pop
|
|
60
|
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onJavaScriptWillLoad) name:RCTJavaScriptWillStartLoadingNotification object:self.bridge];
|
67
|
61
|
}
|
68
|
62
|
|
69
|
63
|
|
|
@@ -74,10 +68,13 @@
|
74
|
68
|
}
|
75
|
69
|
|
76
|
70
|
|
77
|
|
--(void)onJavaScriptDevReload
|
|
71
|
+-(void)onJavaScriptWillLoad
|
78
|
72
|
{
|
79
|
73
|
self.store = [RNNStore new];
|
80
|
|
- UIApplication.sharedApplication.delegate.window.rootViewController = nil;
|
|
74
|
+
|
|
75
|
+ if(![UIApplication.sharedApplication.delegate.window.rootViewController isKindOfClass:[RNNSplashScreen class]]) {
|
|
76
|
+ UIApplication.sharedApplication.delegate.window.rootViewController = nil;
|
|
77
|
+ }
|
81
|
78
|
}
|
82
|
79
|
|
83
|
80
|
|