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

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

未關閉
#1,148 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
JavaScript
星號
324
分支
2k
PR 合併指標
30 天內沒有已合併 PR

描述

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.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從 deep-linking 文件的「Setup on iOS」區段開始,將 npx uri-scheme 指令與手動的 Xcode 說明進行比較。檢查 issue 中連結的 Apple 自訂 URL scheme 指南,包括 Identifier 與 URL Scheme 之間的區別。文件能一致地說明正確的值並反映經過驗證的設定後,即視為完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
ios, react-native
領域
documentation, mobile
Issue 類型
文件
難度
2/5
預估耗時
1-3 小時
活躍度
停滯
描述清晰度
描述清楚
新手友好度
52/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。