|
@@ -0,0 +1,40 @@
|
|
1
|
+# Installing
|
|
2
|
+
|
|
3
|
+### Add dependency
|
|
4
|
+`yarn add react-native-navigation@alpha`
|
|
5
|
+
|
|
6
|
+### Configure Xcode
|
|
7
|
+drag-drop `node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj` into Libraries folder in xcode (along the rest of react)
|
|
8
|
+
|
|
9
|
+Add ReactNativeNavigation into build-phases
|
|
10
|
+
|
|
11
|
+### Configure Gradle
|
|
12
|
+add `compile project(':react-native-navigation')` in build.gradle under dependencies.
|
|
13
|
+
|
|
14
|
+add
|
|
15
|
+
|
|
16
|
+```
|
|
17
|
+include ':react-native-navigation'
|
|
18
|
+project(':react-native-navigation').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation/lib/android/app/')
|
|
19
|
+```
|
|
20
|
+in settings.gradle
|
|
21
|
+
|
|
22
|
+### Setup iOS
|
|
23
|
+in AppDelegate:
|
|
24
|
+
|
|
25
|
+add:
|
|
26
|
+
|
|
27
|
+`#import <ReactNativeNavigation/ReactNativeNavigation.h>`
|
|
28
|
+
|
|
29
|
+remove everything in the method didFinishLaunchingWithOptions and add:
|
|
30
|
+
|
|
31
|
+```
|
|
32
|
+NSURL *jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
|
|
33
|
+[ReactNativeNavigation bootstrap:jsCodeLocation launchOptions:launchOptions];
|
|
34
|
+```
|
|
35
|
+
|
|
36
|
+### Setup Android
|
|
37
|
+
|
|
38
|
+Make your Application object extend from `NavigationApplication` and implement `isDebug` as `BuildConfig.DEBUG`
|
|
39
|
+
|
|
40
|
+Make your Acitivty extend from `NavigationActivity`
|