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
You need to specify a scheme for your app. You can register for a scheme in your `app.json` by adding a string under the scheme key:
34
+
First, you will want to specify a url scheme for your app. This corresponds to the string before `://` in a url, so if your scheme is `mychat` then a link to your app would be `mychat://`. The scheme only applies to standalone apps and you need to re-build the standalone app for the change to take effect. In the Expo client app you can deep link using `exp://ADDRESS:PORT` where `ADDRESS` is often `127.0.0.1` and `PORT` is often `19000` - the URL is printed when you run `expo start`. If you want to test with your custom scheme you will need to run `expo build:ios -t simulator` or `expo build:android` and install the resulting binaries in your emulators. You can register for a scheme in your `app.json` by adding a string under the scheme key:
35
35
36
36
```json
37
37
{
@@ -41,33 +41,36 @@ You need to specify a scheme for your app. You can register for a scheme in your
41
41
}
42
42
```
43
43
44
+
44
45
### URI Prefix
45
46
46
47
Next, let's configure our navigation container to extract the path from the app's incoming URI.
The reason that is necessary to use `Expo.Linking.makeUrl` is that the scheme will differ depending on whether you're in the client app or in a standalone app.
60
+
61
+
### Test deep linking on iOS
57
62
58
-
To test the URI on the simulator (Expo client app ), run the following:
63
+
To test the URI on the simulator in the Expo client app, run the following:
59
64
60
65
```
61
66
xcrun simctl openurl booted [ put your URI prefix in here ]
To test the intent handling in Android (Expo client app ), run the following:
73
76
@@ -76,8 +79,7 @@ adb shell am start -W -a android.intent.action.VIEW -d "[ put your URI prefix in
76
79
77
80
// for example
78
81
79
-
adb shell am start -W -a android.intent.action.VIEW -d "exp://127.0.0.1:19004/--/chat/Eric" com.simpleapp
80
-
82
+
adb shell am start -W -a android.intent.action.VIEW -d "exp://127.0.0.1:19000/--/chat/Eric" com.simpleapp
81
83
```
82
84
83
85
Read the [Expo linking guide](https://docs.expo.io/versions/latest/guides/linking.html) for more information about how to configure linking in projects built with Expo.
0 commit comments