Browse Source

clarify app delegate

talkol 8 years ago
parent
commit
2aafc40e6a
1 changed files with 1 additions and 23 deletions
  1. 1
    23
      example/ios/example/AppDelegate.m

+ 1
- 23
example/ios/example/AppDelegate.m View File

11
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
11
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
12
 {
12
 {
13
   NSURL *jsCodeLocation;
13
   NSURL *jsCodeLocation;
14
-
15
-  /**
16
-   * Loading JavaScript code - uncomment the one you want.
17
-   *
18
-   * OPTION 1
19
-   * Load from development server. Start the server from the repository root:
20
-   *
21
-   * $ npm start
22
-   *
23
-   * To run on device, change `localhost` to the IP address of your computer
24
-   * (you can get this by typing `ifconfig` into the terminal and selecting the
25
-   * `inet` value under `en0:`) and make sure your computer and iOS device are
26
-   * on the same Wi-Fi network.
27
-   */
28
-
29
   jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
14
   jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
30
-
31
-  /**
32
-   * OPTION 2
33
-   * Load from pre-bundled file on disk. The static bundle is automatically
34
-   * generated by "Bundle React Native code and images" build step.
35
-   */
36
-
37
   // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
15
   // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
38
 
16
 
39
 
17
 
50
                                                       moduleName:@"example"
28
                                                       moduleName:@"example"
51
                                                initialProperties:nil
29
                                                initialProperties:nil
52
                                                    launchOptions:launchOptions];
30
                                                    launchOptions:launchOptions];
53
-
54
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
31
   self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
55
   UIViewController *rootViewController = [UIViewController new];
32
   UIViewController *rootViewController = [UIViewController new];
56
   rootViewController.view = rootView;
33
   rootViewController.view = rootView;
57
   self.window.rootViewController = rootViewController;
34
   self.window.rootViewController = rootViewController;
58
   [self.window makeKeyAndVisible];
35
   [self.window makeKeyAndVisible];
59
   */
36
   */
37
+  
60
 
38
 
61
   return YES;
39
   return YES;
62
 }
40
 }