Skip to content

Improve Documentation for RNN Installation #8042

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 5 commits into from
Jun 11, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixes after PR
  • Loading branch information
gosha212 committed Jun 11, 2025
commit 9556fa6b306419ab9c5fbf9dff788a2d4ae18f4f
46 changes: 22 additions & 24 deletions website/docs/docs/docs-Installing.mdx
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@ sidebar_label: Installation

- node >= 18.18
- react-native = 0.77 (0.78 - 0.80 support is in progress)
- new architecture enabled (if you are not using the new architecture, you can still use react-native-navigation of version 7.x.x with react-native 0.73 and lower)

## npm or yarn

@@ -102,7 +103,7 @@ If installation with `npx rnn-link` did not work, follow the manual installation
#### Installation with CocoaPods

1. `cd ios && pod install`
`cd ios && pod install`

#### Native Installation

@@ -131,8 +132,8 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l

```objectivec
#import <UIKit/UIKit.h>
+ #import "RNNAppDelegate.h"
- #import <RCTAppDelegate.h>
+ #import "RNNAppDelegate.h"

- @interface AppDelegate : RCTAppDelegate
+ @interface AppDelegate : RNNAppDelegate
@@ -143,15 +144,15 @@ In Xcode, you will need to edit this file: `AppDelegate.h`. Its content should l

### Android

> Make sure your Android Studio installation is up to date. We recommend editing `gradle` and `java` files in Android Studio as the IDE will suggest fixes and point out errors, this way you avoid most common pitfalls.
> 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`:

```diff
buildscript {
ext {
kotlinVersion = "2.0.21"
+ RNNKotlinVersion = kotlinVersion
+ RNNKotlinVersion = kotlinVersion
compileSdkVersion = 35
buildToolsVersion = "35.0.0"
minSdkVersion = 24
@@ -214,39 +215,36 @@ import com.reactnativenavigation.react.NavigationPackage
import com.reactnativenavigation.react.NavigationReactNativeHost

class MainApplication : NavigationApplication() {
override val reactNativeHost: ReactNativeHost = object : NavigationReactNativeHost(this) {
override fun getJSMainModuleName(): String {
return "index"
}
override val reactNativeHost: ReactNativeHost =
- object : DefaultReactNativeHost(this) {
+ object : NavigationReactNativeHost(this) {

override fun getUseDeveloperSupport(): Boolean {
return BuildConfig.DEBUG
}
override fun getPackages(): List<ReactPackage> =
PackageList(this).packages.apply {
// Packages that cannot be autolinked yet can be added manually here, for example:
// add(MyReactNativePackage())
}

public override fun getPackages(): List<ReactPackage> {
val packages = PackageList(this).packages
packages.add(NavigationPackage())
return packages
}
override fun getJSMainModuleName(): String = "index"

override val isHermesEnabled: Boolean
get() = BuildConfig.IS_HERMES_ENABLED
override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG

override val isNewArchEnabled: Boolean
get() = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED

override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}

override val reactHost: ReactHost
get() = getDefaultReactHost(this, reactNativeHost)

- override fun onCreate() {
- super.onCreate()
override fun onCreate() {
super.onCreate()
- SoLoader.init(this, OpenSourceMergedSoMapping)
- if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
- // If you opted-in for the New Architecture, we load the native entry point for this app.
- load()
- }
- }
}
}

```
@@ -307,4 +305,4 @@ dependencies {
```

```
```
```