react-navigation / react-navigation/react-navigation.github.io

Is deep linking documentation for ios wrong with regards to the scheme and identifier?

Offen
#1,148 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
324
Forks
2k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

initially posted here: https://github.com/react-navigation/react-navigation/discussions/10462
but got no response, and i feel like this is important.


under the docs for deep linking on ios: https://reactnavigation.org/docs/deep-linking/#setup-on-ios

there is a section for setting the scheme in the project.

here it says you can run a command to do it automatically:

npx uri-scheme add mychat --ios

this does indeed add mychat as a "URL Scheme" in Xcode. however, it does not add an "Identifier". that is left blank.

then underneath, there are instructions on how to do it manually instead of automatically.

here it shows that we need to add mychat for both "Identifier" and "URL Scheme". this is different than the previous method, now "Identifier" is no longer left blank.

i found the apple docs for deep linking: https://developer.apple.com/documentation/xcode/defining-a-custom-url-scheme-for-your-app

and here it says:

The identifier you supply with your scheme distinguishes your app from others that declare support for the same scheme. To ensure uniqueness, specify a reverse DNS string that incorporates your company’s domain and app name.

their example also shows that the "Identifier" is com.example.myphotoapp while the "URL Scheme" is myphotoapp.

so this makes me believe that the react-navigation documentation shouldt say we should set same string for both. it should show an example similar to the example from Apple.

now since every app already has a bundleId which is a reverse DNS string, that one should be used.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne im Abschnitt „Setup on iOS“ der Dokumentation zum Deep Linking und vergleiche den Befehl npx uri-scheme mit den manuellen Xcode-Anweisungen. Prüfe die in der Issue verlinkten Hinweise von Apple zu benutzerdefinierten URL-Schemes, einschließlich der Unterscheidung zwischen Identifier und URL Scheme. Als abgeschlossen gilt die Aufgabe, wenn die Dokumentation die korrekten Werte konsistent erklärt und die verifizierte Einrichtung widerspiegelt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ios, react-native
Bereich
documentation, mobile
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.