|
@@ -1,45 +1,21 @@
|
1
|
|
-#import "AppDelegate.h"
|
2
|
|
-#import "RNNCustomViewController.h"
|
3
|
|
-
|
4
|
|
-// **********************************************
|
5
|
|
-// *** DON'T MISS: THE NEXT LINE IS IMPORTANT ***
|
6
|
|
-// **********************************************
|
7
|
1
|
#import <React/RCTBundleURLProvider.h>
|
8
|
2
|
#import <ReactNativeNavigation/ReactNativeNavigation.h>
|
9
|
|
-
|
10
|
|
-// IMPORTANT: if you're getting an Xcode error that RCCManager.h isn't found, you've probably ran "npm install"
|
11
|
|
-// with npm ver 2. You'll need to "npm install" with npm 3 (see https://github.com/wix/react-native-navigation/issues/1)
|
12
|
|
-
|
13
|
3
|
#import <React/RCTRootView.h>
|
14
|
4
|
|
|
5
|
+#import "AppDelegate.h"
|
|
6
|
+#import "RNNCustomViewController.h"
|
|
7
|
+
|
15
|
8
|
@implementation AppDelegate
|
16
|
9
|
|
17
|
10
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
18
|
11
|
{
|
19
|
|
- // **********************************************
|
20
|
|
- // *** DON'T MISS: THIS IS HOW WE BOOTSTRAP *****
|
21
|
|
- // **********************************************
|
22
|
|
- NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
|
|
12
|
+ NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
|
23
|
13
|
[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
|
24
|
14
|
|
25
|
15
|
[ReactNativeNavigation registerExternalComponent:@"RNNCustomComponent" callback:^UIViewController *(NSDictionary *props, RCTBridge *bridge) {
|
26
|
16
|
return [[RNNCustomViewController alloc] initWithProps:props];
|
27
|
17
|
}];
|
28
|
18
|
|
29
|
|
- /*
|
30
|
|
- // original RN bootstrap - remove this part
|
31
|
|
- RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation
|
32
|
|
- moduleName:@"com.example.WelcomeScreen"
|
33
|
|
- initialProperties:nil
|
34
|
|
- launchOptions:launchOptions];
|
35
|
|
- self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
36
|
|
- UIViewController *rootViewController = [UIViewController new];
|
37
|
|
- rootViewController.view = rootView;
|
38
|
|
- self.window.rootViewController = rootViewController;
|
39
|
|
- [self.window makeKeyAndVisible];
|
40
|
|
- */
|
41
|
|
-
|
42
|
|
-
|
43
|
19
|
return YES;
|
44
|
20
|
}
|
45
|
21
|
|