瀏覽代碼

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 7 年之前
父節點
當前提交
a4af603c56
共有 2 個檔案被更改,包括 13 行新增1 行删除
  1. 11
    1
      docs/installation-android.md
  2. 2
    0
      docs/installation-ios.md

+ 11
- 1
docs/installation-android.md 查看文件

@@ -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 查看文件

@@ -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).