Browse Source

Document how to use index.js as entry point (#2412)

* Document how to use index.js as entry point (ios)

* android too

* android too (fixed)
Adrien HARNAY 6 years ago
parent
commit
a4af603c56
2 changed files with 13 additions and 1 deletions
  1. 11
    1
      docs/installation-android.md
  2. 2
    0
      docs/installation-ios.md

+ 11
- 1
docs/installation-android.md View File

@@ -72,6 +72,17 @@
72 72
 	}
73 73
 	```
74 74
 
75
+	Also, add the following
76
+
77
+   ```java
78
+   @Override
79
+   public String getJSMainModuleName() {
80
+   	return "index";
81
+   }
82
+   ```
83
+
84
+   if you are using `index.js` as your entry point instead of `index.ios.js` and `index.android.js` (it is the default since React Native 0.49).
85
+
75 86
 	Make sure that `isDebug` and `createAdditionalReactPackages` methods are implemented.
76 87
 
77 88
 6. Update `AndroidManifest.xml` and set **android:name** value to `.MainApplication`
@@ -81,4 +92,3 @@
81 92
 		...
82 93
 	/>
83 94
 	```
84
-

+ 2
- 0
docs/installation-ios.md View File

@@ -21,3 +21,5 @@
21 21
     ```
22 22
 
23 23
 Its content must be replaced with the content of this [reference](https://github.com/wix/react-native-navigation/blob/master/example/ios/example/AppDelegate.m)
24
+
25
+Replace `@"index.ios"` with `@"index"` if you are using `index.js` as your entry point instead of `index.ios.js` and `index.android.js` (it is the default since React Native 0.49).