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
@@ -133,7 +132,7 @@ Let's configure the native iOS app to open based on the `mychat://` URI scheme.
133
132
134
133
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
135
134
136
-
```
135
+
```objc
137
136
// Add the header at the top of the file:
138
137
#import<React/RCTLinkingManager.h>
139
138
@@ -158,7 +157,7 @@ react-native run-ios
158
157
159
158
To test the URI on the simulator, run the following:
160
159
161
-
```
160
+
```sh
162
161
xcrun simctl openurl booted mychat://chat/Eric
163
162
```
164
163
@@ -172,7 +171,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
172
171
1. Set `launchMode` of `MainActivity` to `singleTask` in order to receive intent on existing `MainActivity`. It is useful if you want to perform navigation using deep link you have been registered - [details](http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters)
173
172
2. Add the new `intent-filter` inside the `MainActivity` entry with a `VIEW` type action:
174
173
175
-
```
174
+
```xml
176
175
<activity
177
176
android:name=".MainActivity"
178
177
android:launchMode="singleTask">
@@ -184,7 +183,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
To test the intent handling in Android, run the following:
199
198
200
-
```
199
+
```sh
201
200
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
202
201
```
203
202
203
+
## Hybrid iOS Applications (Skip for RN only projects)
204
+
205
+
If you're using React Navigation within a hybrid app - an iOS app that has both Swift/ObjC and React Native parts - you may be missing the `RCTLinkingIOS` subspec in your Podfile, which is installed by default in new RN projects. To add this, ensure your Podfile looks like the following:
206
+
207
+
```pod
208
+
pod 'React', :path =>'../node_modules/react-native', :subspecs => [
209
+
...// other subspecs
210
+
'RCTLinkingIOS',
211
+
...
212
+
]
213
+
```
214
+
204
215
## Disable deep linking
205
216
206
217
In case you want to handle routing with deep-linking by yourself instead of `react-navigation`, you can pass `enableURLHandling={false}` prop to your app container:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-4.x/drawer-navigator.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,38 @@ Next, we need to link these libraries. The steps depends on your React Native ve
50
50
react-native link react-native-gesture-handler
51
51
```
52
52
53
-
**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation.
53
+
To finalize installation of `react-native-gesture-handler` for Android, be sure to make the necessary modifications to `MainActivity.java`:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-4.x/getting-started.md
+2-82Lines changed: 2 additions & 82 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,86 +25,6 @@ yarn add react-navigation
25
25
# npm install react-navigation
26
26
```
27
27
28
-
Now we need to install [`react-native-gesture-handler`](https://github.com/kmagiera/react-native-gesture-handler) and [`react-native-reanimated`](https://github.com/kmagiera/react-native-reanimated).
28
+
When you use a navigator, you'll need to follow the installation instructions of that navigator for any additional configuration.
29
29
30
-
If you are using Expo, to ensure that you get the compatible versions of the libraries, run:
If you are using Expo, you are done. Otherwise, continue to the next steps.
43
-
44
-
Next, we need to link these libraries. The steps depends on your React Native version:
45
-
46
-
-**React Native 0.60 and higher**
47
-
48
-
On newer versions of React Native, [linking is automatic](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).
49
-
50
-
To complete the linking on iOS, make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run:
51
-
52
-
```sh
53
-
cd ios
54
-
pod install
55
-
cd ..
56
-
```
57
-
58
-
-**React Native 0.59 and lower**
59
-
60
-
If you're on an older React Native version, you need to manually link the dependencies. To do that, run:
61
-
62
-
```sh
63
-
react-native link react-native-reanimated
64
-
react-native link react-native-gesture-handler
65
-
```
66
-
67
-
To finalize installation of `react-native-gesture-handler` for Android, be sure to make the necessary modifications to `MainActivity.java`:
+ return new ReactActivityDelegate(this, getMainComponentName()) {
87
-
+ @Override
88
-
+ protected ReactRootView createRootView() {
89
-
+ return new RNGestureHandlerEnabledRootView(MainActivity.this);
90
-
+ }
91
-
+ };
92
-
+ }
93
-
}
94
-
```
95
-
96
-
Finally, run `react-native run-android` or `react-native run-ios` to launch the app on your device/simulator.
97
-
98
-
## Hybrid iOS Applications (Skip for RN only projects)
99
-
100
-
If you're using React Navigation within a hybrid app - an iOS app that has both Swift/ObjC and React Native parts - you may be missing the `RCTLinkingIOS` subspec in your Podfile, which is installed by default in new RN projects. To add this, ensure your Podfile looks like the following:
101
-
102
-
```
103
-
pod 'React', :path => '../node_modules/react-native', :subspecs => [
104
-
. . . // other subspecs
105
-
'RCTLinkingIOS',
106
-
. . .
107
-
]
108
-
```
109
-
110
-
You're good to go! Continue to ["Hello React Navigation"](hello-react-navigation.html) to start writing some code.
30
+
Continue to ["Hello React Navigation"](hello-react-navigation.html) to start writing some code.
Copy file name to clipboardExpand all lines: website/versioned_docs/version-4.x/material-top-tab-navigator.md
+32-1Lines changed: 32 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,38 @@ Next, we need to link these libraries. The steps depends on your React Native ve
52
52
react-native link react-native-gesture-handler
53
53
```
54
54
55
-
**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation.
55
+
To finalize installation of `react-native-gesture-handler` for Android, be sure to make the necessary modifications to `MainActivity.java`:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-4.x/stack-navigator-2.0.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,36 @@ Next, we need to link these libraries. The steps depends on your React Native ve
56
56
react-native link react-native-gesture-handler
57
57
```
58
58
59
-
**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation.
59
+
To finalize installation of `react-native-gesture-handler` for Android, be sure to make the necessary modifications to `MainActivity.java`:
Copy file name to clipboardExpand all lines: website/versioned_docs/version-4.x/stack-navigator.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,36 @@ Next, we need to link these libraries. The steps depends on your React Native ve
53
53
react-native link react-native-gesture-handler
54
54
```
55
55
56
-
**IMPORTANT:** There are additional steps required for `react-native-gesture-handler` on Android after linking (for all React Native versions). Check the [this guide](https://kmagiera.github.io/react-native-gesture-handler/docs/getting-started.html) to complete the installation.
56
+
To finalize installation of `react-native-gesture-handler` for Android, be sure to make the necessary modifications to `MainActivity.java`:
0 commit comments