Skip to content

Commit d5cb4e0

Browse files
committed
Change Linking.makeUrl to Linking.createURL
1 parent 10a7a2f commit d5cb4e0

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

versioned_docs/version-4.x/deep-linking.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,21 @@ First, you will want to specify a URL scheme for your app. This corresponds to t
8181
Next, let's configure our navigation container to extract the path from the app's incoming URI.
8282

8383
```js
84-
import { Linking } from 'expo';
84+
// Install this package with `expo install expo-linking`
85+
import * as Linking from 'expo-linking';
8586

8687
const SimpleApp = createAppContainer(createStackNavigator({...}));
8788

88-
const prefix = Linking.makeUrl('/');
89+
// Linking.createURL is available as of [email protected] and [email protected]. If
90+
// you are using older versions, you can upgrade or use Linking.makeUrl instead,
91+
// but note that your deep links in standalone apps will be in the format
92+
// scheme:/// rather than scheme:// if you use makeUrl.
93+
const prefix = Linking.createURL('/');
8994

9095
const MainApp = () => <SimpleApp uriPrefix={prefix} />;
9196
```
9297

93-
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.
98+
The reason that is necessary to use `Linking.createURL` is that the scheme will differ depending on whether you're in the client app or in a standalone app.
9499

95100
### Test deep linking on iOS
96101

versioned_docs/version-5.x/deep-linking.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ Next, let's configure our navigation container to extract the path from the app'
3333
// Install this package with `expo install expo-linking`
3434
import * as Linking from 'expo-linking';
3535

36-
const prefix = Linking.makeUrl('/');
36+
// Linking.createURL is available as of [email protected] and [email protected]. If
37+
// you are using older versions, you can upgrade or use Linking.makeUrl instead,
38+
// but note that your deep links in standalone apps will be in the format
39+
// scheme:/// rather than scheme:// if you use makeUrl.
40+
const prefix = Linking.createURL('/');
3741

3842
function App() {
3943
const linking = {
@@ -48,7 +52,7 @@ function App() {
4852
}
4953
```
5054

51-
The reason that is necessary to use `Linking.makeUrl` is that the scheme will differ depending on whether you're in the client app or in a standalone app.
55+
The reason that is necessary to use `Linking.createURL` is that the scheme will differ depending on whether you're in the client app or in a standalone app.
5256

5357
### Universal Links
5458

0 commit comments

Comments
 (0)