Browse Source

Example app guesses the IP address for you. (#637)

Royce Townsend 7 years ago
parent
commit
fb91ef32cc
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      example/ios/example/AppDelegate.m

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

@@ -1,4 +1,5 @@
1 1
 #import "AppDelegate.h"
2
+#import "RCTBundleURLProvider.h"
2 3
 
3 4
 // **********************************************
4 5
 // *** DON'T MISS: THE NEXT LINE IS IMPORTANT ***
@@ -16,7 +17,8 @@
16 17
 {
17 18
   NSURL *jsCodeLocation;
18 19
 #ifdef DEBUG
19
-  jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
20
+//  jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
21
+  jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
20 22
 #else
21 23
    jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
22 24
 #endif