Skip to content

Patch improvements into revised, v8.x.x install guide #8047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 12, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions website/docs/docs/docs-Installing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ yarn:
yarn add react-native-navigation
```

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

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.

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:

`npx rnn-link`
```sh
npx rnn-link
````

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

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

#### Installation with CocoaPods

`cd ios && pod install`
```sh
cd ios && pod install
```

#### Native Installation

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

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

```swift
```diff
import UIKit
import React
- import React_RCTAppDelegate
Expand All @@ -130,7 +134,7 @@ import ReactAppDependencyProvider

In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should look like this:

```objectivec
```diff
#import <UIKit/UIKit.h>
- #import <RCTAppDelegate.h>
+ #import "RNNAppDelegate.h"
Expand All @@ -146,7 +150,7 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l

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

#### 1 Update `android/build.gradle`:
#### 1. Update `android/build.gradle`:

```diff
buildscript {
Expand Down Expand Up @@ -181,7 +185,7 @@ allprojects {
}
```

#### 2 Update `MainActivity.kt`
#### 2. Update `MainActivity.kt`


```diff
Expand All @@ -198,12 +202,12 @@ allprojects {

If you have any **react-native** related methods, you can safely delete them.

#### 3 Update `MainApplication.kt`
#### 3. Update `MainApplication.kt`

This file is located in `android/app/src/main/java/com/<yourproject>/MainApplication.java`.

```diff
...
// ...

import com.facebook.react.PackageList
import com.facebook.react.ReactHost
Expand Down Expand Up @@ -261,7 +265,7 @@ Now that you're done, don't forget to update the `index.js` file, as [shown abov

```
"scripts": {
...
// ...
"android": "cd ./android && ./gradlew app:assembleDebug && ./gradlew installDebug"
}
```
Expand Down Expand Up @@ -303,6 +307,3 @@ dependencies {
}

```

```
```
Loading