Skip to content

Commit 25fc3fc

Browse files
authored
Improve revised install guide (#8047)
1 parent 8d9b6b0 commit 25fc3fc

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

website/docs/docs/docs-Installing.mdx

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@ yarn:
2424
yarn add react-native-navigation
2525
```
2626

27-
## Installing with `npx rnn-link`
27+
## Installing with `npx rnn-link` (automatic installation)
2828

2929
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.
3030

3131
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:
3232

33-
`npx rnn-link`
33+
```sh
34+
npx rnn-link
35+
````
3436

3537
Make sure to commit the changes introduced by the `rnn-link` script.
3638

@@ -103,7 +105,9 @@ If installation with `npx rnn-link` did not work, follow the manual installation
103105

104106
#### Installation with CocoaPods
105107

106-
`cd ios && pod install`
108+
```sh
109+
cd ios && pod install
110+
```
107111

108112
#### Native Installation
109113

@@ -113,7 +117,7 @@ If installation with `npx rnn-link` did not work, follow the manual installation
113117

114118
In Xcode, you will need to update this file: `AppDelegate.swift`
115119

116-
```swift
120+
```diff
117121
import UIKit
118122
import React
119123
- import React_RCTAppDelegate
@@ -130,7 +134,7 @@ import ReactAppDependencyProvider
130134
131135
In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should look like this:
132136
133-
```objectivec
137+
```diff
134138
#import <UIKit/UIKit.h>
135139
- #import <RCTAppDelegate.h>
136140
+ #import "RNNAppDelegate.h"
@@ -146,7 +150,7 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l
146150
147151
> 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.
148152
149-
#### 1 Update `android/build.gradle`:
153+
#### 1. Update `android/build.gradle`:
150154
151155
```diff
152156
buildscript {
@@ -181,7 +185,7 @@ allprojects {
181185
}
182186
```
183187
184-
#### 2 Update `MainActivity.kt`
188+
#### 2. Update `MainActivity.kt`
185189
186190
187191
```diff
@@ -198,12 +202,12 @@ allprojects {
198202
199203
If you have any **react-native** related methods, you can safely delete them.
200204
201-
#### 3 Update `MainApplication.kt`
205+
#### 3. Update `MainApplication.kt`
202206
203207
This file is located in `android/app/src/main/java/com/<yourproject>/MainApplication.java`.
204208
205209
```diff
206-
...
210+
// ...
207211
208212
import com.facebook.react.PackageList
209213
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
261265
262266
```
263267
"scripts": {
264-
...
268+
// ...
265269
"android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug"
266270
}
267271
```
@@ -303,6 +307,3 @@ dependencies {
303307
}
304308
305309
```
306-
307-
```
308-
```

0 commit comments

Comments
 (0)