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
To test the intent handling in the Expo client app on Android, run the following:
115
115
116
-
```sh
116
+
```bash
117
117
adb shell am start -W -a android.intent.action.VIEW -d "[ put your URI prefix in here ]" host.exp.exponent
118
118
119
119
# for example
@@ -145,7 +145,7 @@ Let's configure the native iOS app to open based on the `mychat://` URI scheme.
145
145
146
146
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
147
147
148
-
```sh
148
+
```bash
149
149
// Add the header at the top of the file:
150
150
#import <React/RCTLinkingManager.h>
151
151
@@ -163,13 +163,13 @@ In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the pr
163
163
164
164
Now you can press play in Xcode, or re-build on the command line:
165
165
166
-
```sh
166
+
```bash
167
167
react-native run-ios
168
168
```
169
169
170
170
To test the URI on the simulator, run the following:
171
171
172
-
```sh
172
+
```bash
173
173
xcrun simctl openurl booted mychat://chat/Eric
174
174
```
175
175
@@ -184,7 +184,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
184
184
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)
185
185
2. Add the new `intent-filter` inside the `MainActivity` entry with a `VIEW` type action:
186
186
187
-
```sh
187
+
```bash
188
188
<activity
189
189
android:name=".MainActivity"
190
190
android:launchMode="singleTask">
@@ -203,13 +203,13 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
203
203
204
204
Now, re-install the app:
205
205
206
-
```sh
206
+
```bash
207
207
react-native run-android
208
208
```
209
209
210
210
To test the intent handling in Android, run the following:
211
211
212
-
```sh
212
+
```bash
213
213
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
@@ -66,15 +66,15 @@ Next, we need to link these libraries. The steps depends on your React Native ve
66
66
67
67
If you're on a Mac and developing for iOS, you need to install pods to complete the linking. Make sure you have [Cocoapods](https://cocoapods.org/) installed. Then run:
68
68
69
-
```sh
69
+
```bash
70
70
cd ios; pod install;cd ..
71
71
```
72
72
73
73
-**React Native 0.59 and lower**
74
74
75
75
If you're on an older React Native version, you need to manually link the dependencies. To do that, run:
76
76
77
-
```sh
77
+
```bash
78
78
react-native link react-native-reanimated
79
79
react-native link react-native-gesture-handler
80
80
react-native link react-native-screens
@@ -99,7 +99,7 @@ Next, we need to link these libraries. The steps depends on your React Native ve
Copy file name to clipboardExpand all lines: versioned_docs/version-4.x/troubleshooting.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -19,13 +19,13 @@ If the module points to a local file (i.e. the name of the module starts with `.
19
19
20
20
If you're using Expo, run:
21
21
22
-
```sh
22
+
```bash
23
23
expo start -c
24
24
```
25
25
26
26
If you're not using Expo, run:
27
27
28
-
```sh
28
+
```bash
29
29
npx react-native start --reset-cache
30
30
```
31
31
@@ -43,21 +43,21 @@ This and some similar errors might occur if you didn't link the [`react-native-g
43
43
44
44
On newer versions of React Native, [linking is automatic](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md), so if you have linked the library manually, first unlink it:
45
45
46
-
```sh
46
+
```bash
47
47
react-native unlink react-native-gesture-handler
48
48
```
49
49
50
50
If you're testing on iOS and use Mac, make sure you have run `pod install` in the `ios/` folder:
51
51
52
-
```sh
52
+
```bash
53
53
cd ios; pod install;cd ..
54
54
```
55
55
56
56
-**React Native 0.59 and lower**
57
57
58
58
If you're on an older React Native version, you need to manually link the library. To do that, run:
59
59
60
-
```sh
60
+
```bash
61
61
react-native link react-native-gesture-handler
62
62
```
63
63
@@ -67,7 +67,7 @@ Now rebuild the app and test on your device or simulator.
67
67
68
68
This error can often happen if you have a Babel plugin that compiles the code in a non-spec compliant way. For example:
Copy file name to clipboardExpand all lines: versioned_docs/version-5.x/configuring-links.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -688,7 +688,7 @@ In the example app, you will use the Expo managed workflow. The guide will focus
688
688
689
689
First, you need to decide the navigation structure of your app. To keep it simple, the main navigator will be bottom-tabs navigator with two screens. Its first screen will be a simple stack navigator, called `HomeStack`, with two screens: `Home` and `Profile`, and the second tabs screen will be just a simple one without any nested navigators, called `Settings`:
@@ -124,25 +124,25 @@ The project uses a monorepo structure for the packages managed by [yarn workspac
124
124
125
125
Look around. Match the style of the rest of the codebase. This project uses ESLint to ensure consistency throughout the project. You can check your project by running:
126
126
127
-
```sh
127
+
```bash
128
128
yarn lint
129
129
```
130
130
131
131
If any errors occur you'll either have to manually fix them or you can attempt to automatically fix them by running:
132
132
133
-
```sh
133
+
```bash
134
134
yarn lint --fix
135
135
```
136
136
137
137
The codebase is written in TypeScript, and must pass typecheck. To typecheck files, run:
138
138
139
-
```sh
139
+
```bash
140
140
yarn typescript
141
141
```
142
142
143
143
It's useful to run typechecking in watch mode when working on the project. To do it, run:
144
144
145
-
```sh
145
+
```bash
146
146
yarn typescript --watch
147
147
```
148
148
@@ -152,21 +152,21 @@ The [example app](https://github.com/react-navigation/react-navigation/tree/main
152
152
153
153
While developing, you can run the [example app](https://github.com/react-navigation/react-navigation/tree/main/example) with [Expo](https://expo.io/) to test your changes:
154
154
155
-
```sh
155
+
```bash
156
156
yarn example start
157
157
```
158
158
159
159
### Run Tests
160
160
161
161
React Navigation has tests implemented in [Jest](https://facebook.github.io/jest/). To run either of these, from the React Navigation directory, run either of the following commands (after installing the `node_modules`) to run tests or type-checking.
162
162
163
-
```sh
163
+
```bash
164
164
yarn test
165
165
```
166
166
167
167
It's useful to run tests in watch mode when working on the project. To do it, run:
0 commit comments