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 摘要。