React-Native Deeplinks with React-Navigation not working

Viewed 1395

I've been trying to set the deeplinks for my app, via react-navigation (v5) so I followed their instructions. I've edited my app delegate to include the package I need and the deeplinking/ universal methods, which i copy pasted from their website. After that they said to add the scheme to the project's configuration so i followed what they said and wrote npx uri-scheme add playlist --ios in the terminal, I can confirm it works because I can do npx uri-scheme list and I get back

› iOS: Schemes for config: ./ios/audvice-tvOS/Info.plist
› playlist://

› Android: Schemes for config: ./android/app/src/main/AndroidManifest.xml
› ${applicationId}://
› ${applicationId}://
› ${applicationId}://
› https://

And now I'd just have to test it by running either npx uri-scheme open playlist://asdf --ios or xcrun simctl openurl booted playlist://asdf, when I do that I get back the following error:

› iOS: Attempting to open URI "playlist://1234" in simulator
An error was encountered processing the command (domain=NSOSStatusErrorDomain, code=-10814):
The operation couldn’t be completed. (OSStatus error -10814.)

Aborting run
An unexpected error was encountered. Please report it as a bug:
Error: xcrun exited with non-zero code: 194
    at ChildProcess.d (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:3255)
    at Object.onceWrapper (events.js:422:26)
    at ChildProcess.emit (events.js:315:20)
    at maybeClose (internal/child_process.js:1051:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
    ...
    at Object.spawnAsync [as default] (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:2740)
    at Object.openAsync (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:261648)
    at Object.openAsync (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:314115)
    at Command.<anonymous> (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:136332)
    at Command.i (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:281412)
    at Command.emit (events.js:315:20)
    at Command.parseArgs (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:284584)
    at Command.parse (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/build/index.js:1:282539)
    at Object.<anonymous> (/Users/chris/.npm/_npx/50946/lib/node_modules/uri-scheme/cli.js:5:9)
    at Module._compile (internal/modules/cjs/loader.js:1200:30) {
  pid: 50949,
  output: [ '', '' ],
  stdout: '',
  stderr: '',
  status: 194,
  signal: null
}

Has anyone ever encountered that before? Thanks in advance!

1 Answers

Experienced the same issue / error. You need to run the application and then the deep linking will work. This means that you actually have no application bundle, so it will not find your app to open the deep link.

Related