feat: add deeplinking to native example (#309)

This commit is contained in:
Michał Osadnik
2020-01-28 16:47:01 +01:00
committed by GitHub
parent 50b366e734
commit e55e866af2
6 changed files with 132 additions and 95 deletions

View File

@@ -1 +1 @@
export default [];
export default ['rne://127.0.0.1:19000/--/'];

View File

@@ -112,6 +112,8 @@ export default function App() {
// To test deep linking on, run the following in the Terminal:
// Android: adb shell am start -a android.intent.action.VIEW -d "exp://127.0.0.1:19000/--/simple-stack"
// iOS: xcrun simctl openurl booted exp://127.0.0.1:19000/--/simple-stack
// Android (bare): adb shell am start -a android.intent.action.VIEW -d "rne://127.0.0.1:19000/--/simple-stack"
// iOS (bare): xcrun simctl openurl booted rne://127.0.0.1:19000/--/simple-stack
// The first segment of the link is the the scheme + host (returned by `Linking.makeUrl`)
const { getInitialState } = useLinking(containerRef, {
prefixes: LinkingPrefixes,