Skip to content

Commit d0714af

Browse files
committed
Use example instead of mychat
1 parent 74ecfeb commit d0714af

17 files changed

+120
-120
lines changed

Diff for: blog/2020-05-16-web-support.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Example:
3434

3535
```js
3636
const linking = {
37-
prefixes: ['https://mychat.com', 'mychat://'],
37+
prefixes: ['https://example.com', 'example://'],
3838
config: {
3939
screens: {
4040
Home: '',

Diff for: blog/2024-03-25-introducing-static-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ There are 2 improvements to deep linking API:
138138
return (
139139
<Navigation
140140
linking={{
141-
prefixes: ['https://mychat.com', 'mychat://'],
141+
prefixes: ['https://example.com', 'example://'],
142142
// highlight-next-line
143143
enabled: 'auto',
144144
}}

Diff for: versioned_docs/version-1.x/deep-linking.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Deep linking
44
sidebar_label: Deep linking
55
---
66

7-
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `mychat://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
7+
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `example://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
88

99
## Configuration
1010

@@ -36,7 +36,7 @@ You need to specify a scheme for your app. You can register for a scheme in your
3636
```json
3737
{
3838
"expo": {
39-
"scheme": "mychat"
39+
"scheme": "example"
4040
}
4141
}
4242
```
@@ -90,14 +90,14 @@ Next, let's configure our navigation container to extract the path from the app'
9090
```js
9191
const SimpleApp = StackNavigator({...}));
9292

93-
const prefix = 'mychat://';
93+
const prefix = 'example://';
9494

9595
const MainApp = () => <SimpleApp uriPrefix={prefix} />;
9696
```
9797

9898
### iOS
9999

100-
Let's configure the native iOS app to open based on the `mychat://` URI scheme.
100+
Let's configure the native iOS app to open based on the `example://` URI scheme.
101101

102102
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
103103

@@ -116,7 +116,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
116116

117117
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
118118

119-
![Xcode project info URL types with mychat added](/assets/deep-linking/xcode-linking.png)
119+
![Xcode project info URL types with example added](/assets/deep-linking/xcode-linking.png)
120120

121121
Now you can press play in Xcode, or re-build on the command line:
122122

@@ -127,10 +127,10 @@ react-native run-ios
127127
To test the URI on the simulator, run the following:
128128

129129
```
130-
xcrun simctl openurl booted mychat://chat/Eric
130+
xcrun simctl openurl booted example://chat/Eric
131131
```
132132

133-
To test the URI on a real device, open Safari and type `mychat://chat/Eric`.
133+
To test the URI on a real device, open Safari and type `example://chat/Eric`.
134134

135135
### Android
136136

@@ -153,7 +153,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
153153
<action android:name="android.intent.action.VIEW" />
154154
<category android:name="android.intent.category.DEFAULT" />
155155
<category android:name="android.intent.category.BROWSABLE" />
156-
<data android:scheme="mychat" />
156+
<data android:scheme="example" />
157157
</intent-filter>
158158
</activity>
159159
```
@@ -167,7 +167,7 @@ react-native run-android
167167
To test the intent handling in Android, run the following:
168168

169169
```
170-
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
170+
adb shell am start -W -a android.intent.action.VIEW -d "example://chat/Eric" com.simpleapp
171171
```
172172

173173
## Disable deep linking

Diff for: versioned_docs/version-2.x/deep-linking.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Deep linking
44
sidebar_label: Deep linking
55
---
66

7-
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `mychat://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
7+
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `example://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
88

99
## Configuration
1010

@@ -36,7 +36,7 @@ You need to specify a scheme for your app. You can register for a scheme in your
3636
```json
3737
{
3838
"expo": {
39-
"scheme": "mychat"
39+
"scheme": "example"
4040
}
4141
}
4242
```
@@ -90,14 +90,14 @@ Next, let's configure our navigation container to extract the path from the app'
9090
```js
9191
const SimpleApp = createStackNavigator({...});
9292

93-
const prefix = 'mychat://';
93+
const prefix = 'example://';
9494

9595
const MainApp = () => <SimpleApp uriPrefix={prefix} />;
9696
```
9797

9898
### iOS
9999

100-
Let's configure the native iOS app to open based on the `mychat://` URI scheme.
100+
Let's configure the native iOS app to open based on the `example://` URI scheme.
101101

102102
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
103103

@@ -116,7 +116,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
116116

117117
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
118118

119-
![Xcode project info URL types with mychat added](/assets/deep-linking/xcode-linking.png)
119+
![Xcode project info URL types with example added](/assets/deep-linking/xcode-linking.png)
120120

121121
Now you can press play in Xcode, or re-build on the command line:
122122

@@ -127,10 +127,10 @@ react-native run-ios
127127
To test the URI on the simulator, run the following:
128128

129129
```
130-
xcrun simctl openurl booted mychat://chat/Eric
130+
xcrun simctl openurl booted example://chat/Eric
131131
```
132132

133-
To test the URI on a real device, open Safari and type `mychat://chat/Eric`.
133+
To test the URI on a real device, open Safari and type `example://chat/Eric`.
134134

135135
### Android
136136

@@ -153,7 +153,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
153153
<action android:name="android.intent.action.VIEW" />
154154
<category android:name="android.intent.category.DEFAULT" />
155155
<category android:name="android.intent.category.BROWSABLE" />
156-
<data android:scheme="mychat" />
156+
<data android:scheme="example" />
157157
</intent-filter>
158158
</activity>
159159
```
@@ -167,7 +167,7 @@ react-native run-android
167167
To test the intent handling in Android, run the following:
168168

169169
```
170-
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
170+
adb shell am start -W -a android.intent.action.VIEW -d "example://chat/Eric" com.simpleapp
171171
```
172172

173173
## Disable deep linking

Diff for: versioned_docs/version-3.x/deep-linking.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Deep linking
44
sidebar_label: Deep linking
55
---
66

7-
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `mychat://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
7+
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `example://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
88

99
## Configuration
1010

@@ -71,7 +71,7 @@ You need to specify a scheme for your app. You can register for a scheme in your
7171
```json
7272
{
7373
"expo": {
74-
"scheme": "mychat"
74+
"scheme": "example"
7575
}
7676
}
7777
```
@@ -125,14 +125,14 @@ Next, let's configure our navigation container to extract the path from the app'
125125
```js
126126
const SimpleApp = createAppContainer(createStackNavigator({...}));
127127

128-
const prefix = 'mychat://';
128+
const prefix = 'example://';
129129

130130
const MainApp = () => <SimpleApp uriPrefix={prefix} />;
131131
```
132132

133133
### iOS
134134

135-
Let's configure the native iOS app to open based on the `mychat://` URI scheme.
135+
Let's configure the native iOS app to open based on the `example://` URI scheme.
136136

137137
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
138138

@@ -151,7 +151,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
151151

152152
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
153153

154-
![Xcode project info URL types with mychat added](/assets/deep-linking/xcode-linking.png)
154+
![Xcode project info URL types with example added](/assets/deep-linking/xcode-linking.png)
155155

156156
Now you can press play in Xcode, or re-build on the command line:
157157

@@ -162,10 +162,10 @@ react-native run-ios
162162
To test the URI on the simulator, run the following:
163163

164164
```
165-
xcrun simctl openurl booted mychat://chat/Eric
165+
xcrun simctl openurl booted example://chat/Eric
166166
```
167167

168-
To test the URI on a real device, open Safari and type `mychat://chat/Eric`.
168+
To test the URI on a real device, open Safari and type `example://chat/Eric`.
169169

170170
### Android
171171

@@ -188,7 +188,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
188188
<action android:name="android.intent.action.VIEW" />
189189
<category android:name="android.intent.category.DEFAULT" />
190190
<category android:name="android.intent.category.BROWSABLE" />
191-
<data android:scheme="mychat" />
191+
<data android:scheme="example" />
192192
</intent-filter>
193193
</activity>
194194
```
@@ -202,7 +202,7 @@ react-native run-android
202202
To test the intent handling in Android, run the following:
203203

204204
```
205-
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
205+
adb shell am start -W -a android.intent.action.VIEW -d "example://chat/Eric" com.simpleapp
206206
```
207207

208208
## Disable deep linking

Diff for: versioned_docs/version-4.x/deep-linking.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Deep linking
44
sidebar_label: Deep linking
55
---
66

7-
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `mychat://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
7+
In this guide we will set up our app to handle external URIs. Let's suppose that we want a URI like `example://chat/Eric` to open our app and link straight into a chat screen for some user named "Eric".
88

99
## Configuration
1010

@@ -66,12 +66,12 @@ const FriendsScreen = createStackNavigator({
6666

6767
## Set up with Expo projects
6868

69-
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:
69+
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 `example` then a link to your app would be `example://`. 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:
7070

7171
```json
7272
{
7373
"expo": {
74-
"scheme": "mychat"
74+
"scheme": "example"
7575
}
7676
}
7777
```
@@ -134,14 +134,14 @@ Next, let's configure our navigation container to extract the path from the app'
134134
```js
135135
const SimpleApp = createAppContainer(createStackNavigator({...}));
136136

137-
const prefix = 'mychat://';
137+
const prefix = 'example://';
138138

139139
const MainApp = () => <SimpleApp uriPrefix={prefix} />;
140140
```
141141

142142
### iOS
143143

144-
Let's configure the native iOS app to open based on the `mychat://` URI scheme.
144+
Let's configure the native iOS app to open based on the `example://` URI scheme.
145145

146146
In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
147147

@@ -159,7 +159,7 @@ In `SimpleApp/ios/SimpleApp/AppDelegate.m`:
159159

160160
In Xcode, open the project at `SimpleApp/ios/SimpleApp.xcodeproj`. Select the project in sidebar and navigate to the info tab. Scroll down to "URL Types" and add one. In the new URL type, set the identifier and the URL scheme to your desired URL scheme.
161161

162-
![Xcode project info URL types with mychat added](/assets/deep-linking/xcode-linking.png)
162+
![Xcode project info URL types with example added](/assets/deep-linking/xcode-linking.png)
163163

164164
Now you can press play in Xcode, or re-build on the command line:
165165

@@ -170,10 +170,10 @@ react-native run-ios
170170
To test the URI on the simulator, run the following:
171171

172172
```bash
173-
xcrun simctl openurl booted mychat://chat/Eric
173+
xcrun simctl openurl booted example://chat/Eric
174174
```
175175

176-
To test the URI on a real device, open Safari and type `mychat://chat/Eric`.
176+
To test the URI on a real device, open Safari and type `example://chat/Eric`.
177177

178178
### Android
179179

@@ -196,7 +196,7 @@ In `SimpleApp/android/app/src/main/AndroidManifest.xml`, do these followings adj
196196
<action android:name="android.intent.action.VIEW" />
197197
<category android:name="android.intent.category.DEFAULT" />
198198
<category android:name="android.intent.category.BROWSABLE" />
199-
<data android:scheme="mychat" />
199+
<data android:scheme="example" />
200200
</intent-filter>
201201
</activity>
202202
```
@@ -210,7 +210,7 @@ react-native run-android
210210
To test the intent handling in Android, run the following:
211211

212212
```bash
213-
adb shell am start -W -a android.intent.action.VIEW -d "mychat://chat/Eric" com.simpleapp
213+
adb shell am start -W -a android.intent.action.VIEW -d "example://chat/Eric" com.simpleapp
214214
```
215215

216216
## Disable deep linking

Diff for: versioned_docs/version-5.x/configuring-links.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const config = {
106106
};
107107

108108
const linking = {
109-
prefixes: ['https://mychat.com', 'mychat://'],
109+
prefixes: ['https://example.com', 'example://'],
110110
config,
111111
};
112112

@@ -616,7 +616,7 @@ Example:
616616

617617
```js
618618
const linking = {
619-
prefixes: ['https://mychat.com', 'mychat://'],
619+
prefixes: ['https://example.com', 'example://'],
620620
config: {
621621
screens: {
622622
Chat: 'feed/:sort',

0 commit comments

Comments
 (0)