Browse Source

installation doc fix

yogevbd 6 years ago
parent
commit
050bf2b9f9
2 changed files with 22 additions and 4 deletions
  1. 21
    3
      docs/docs/Installing.md
  2. 1
    1
      docs/docs/top-level-api.md

+ 21
- 3
docs/docs/Installing.md View File

21
 	 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... }
21
 	 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { ... }
22
 
22
 
23
 	```
23
 	```
24
-  
25
-  Its contents must be replaced with the contents of this [reference](https://github.com/wix/react-native-navigation/blob/v2/playground/ios/playground/AppDelegate.m#L16).
26
-  
24
+
25
+	Its content should look like this:
26
+	```objectivec
27
+	#import "AppDelegate.h"
28
+
29
+	#import <React/RCTBundleURLProvider.h>
30
+	#import <React/RCTRootView.h>
31
+	#import <ReactNativeNavigation/ReactNativeNavigation.h>
32
+
33
+	@implementation AppDelegate
34
+
35
+	- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
36
+	{
37
+		NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
38
+		[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
39
+		
40
+		return YES;
41
+	}
42
+
43
+	@end
44
+	```
27
 
45
 
28
 ## Android
46
 ## Android
29
 
47
 

+ 1
- 1
docs/docs/top-level-api.md View File

1
 # Top Level API
1
 # Top Level API
2
 
2
 
3
 In order to make navigation API homogenous as much as possible, we provide setRoot function that receives layout of any kind.
3
 In order to make navigation API homogenous as much as possible, we provide setRoot function that receives layout of any kind.
4
-See [Layout types](layout-types)
4
+See [Layout types](docs/layout-types)
5
 
5
 
6
 
6
 
7
 ## setRoot(layout)
7
 ## setRoot(layout)