You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/docs/docs-Installing.mdx
+14-13Lines changed: 14 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -24,13 +24,15 @@ yarn:
24
24
yarn add react-native-navigation
25
25
```
26
26
27
-
## Installing with `npx rnn-link`
27
+
## Installing with `npx rnn-link` (automatic installation)
28
28
29
29
You can benefit from autolinking for some of the necessary installation steps. But unlike most other libraries, react-native-navigation requires you to make a few changes to native files.
30
30
31
31
We've simplified the process through a set of scripts. So to make all the necessary changes automatically, in your project's root folder run:
32
32
33
-
`npx rnn-link`
33
+
```sh
34
+
npx rnn-link
35
+
````
34
36
35
37
Make sure to commit the changes introduced by the `rnn-link` script.
36
38
@@ -103,7 +105,9 @@ If installation with `npx rnn-link` did not work, follow the manual installation
103
105
104
106
#### Installation with CocoaPods
105
107
106
-
`cd ios && pod install`
108
+
```sh
109
+
cd ios && pod install
110
+
```
107
111
108
112
#### Native Installation
109
113
@@ -113,7 +117,7 @@ If installation with `npx rnn-link` did not work, follow the manual installation
113
117
114
118
In Xcode, you will need to update this file: `AppDelegate.swift`
In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should look like this:
132
136
133
-
```objectivec
137
+
```diff
134
138
#import <UIKit/UIKit.h>
135
139
- #import <RCTAppDelegate.h>
136
140
+ #import "RNNAppDelegate.h"
@@ -146,7 +150,7 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l
146
150
147
151
> Make sure your Android Studio installation is up to date. We recommend editing `gradle` and `kotlin` files in Android Studio as the IDE will suggest fixes and point out errors, this way you avoid most common pitfalls.
148
152
149
-
#### 1 Update `android/build.gradle`:
153
+
#### 1. Update `android/build.gradle`:
150
154
151
155
```diff
152
156
buildscript {
@@ -181,7 +185,7 @@ allprojects {
181
185
}
182
186
```
183
187
184
-
#### 2 Update `MainActivity.kt`
188
+
#### 2. Update `MainActivity.kt`
185
189
186
190
187
191
```diff
@@ -198,12 +202,12 @@ allprojects {
198
202
199
203
If you have any **react-native** related methods, you can safely delete them.
200
204
201
-
#### 3 Update `MainApplication.kt`
205
+
#### 3. Update `MainApplication.kt`
202
206
203
207
This file is located in`android/app/src/main/java/com/<yourproject>/MainApplication.java`.
204
208
205
209
```diff
206
-
...
210
+
// ...
207
211
208
212
import com.facebook.react.PackageList
209
213
import com.facebook.react.ReactHost
@@ -261,7 +265,7 @@ Now that you're done, don't forget to update the `index.js` file, as [shown abov
0 commit comments