首页 > 解决方案 > 将关联域添加到 Expo React-Native 应用程序

问题描述

我正在尝试将关联域添加到我的 Expo(非弹出)react-native 项目中。

我的应用程序构建良好并通过 XCode 应用程序加载器正常提交。

但是,如果我将associatedDomains数组添加到我的数组中,app.json当我尝试提交应用程序时会出现错误:

ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.developer.associated-domains' in 'Payload/ExpoKitApp.app/ExpoKitApp'."

我根本没有在 XCode 中开发这个。我一直在自己的环境中构建应用程序,运行expo build:ios,下载.ipa文件,在 Mac 上打开 XCode,然后运行将Xcode > Open Developer Tools > Application Loader其提交到 testflight。该过程一直运行良好,但我不确定在 XCode 或我的 Apple 开发人员帐户中的哪个位置我需要启用该权利,是否需要更新某些配置文件,如果需要,我随后将其放在哪里。

世博会文档提到(https://docs.expo.io/versions/latest/workflow/linking/#universal-links-on-ios)我需要“要将您的域添加到权利,请单击添加(+)在“域”表的底部添加一个带有 webcredentials: 前缀的占位符域。将占位符替换为您网站的域,保留前缀。” 但我不知道我的域表在哪里。是在苹果网页界面中,还是在 XCode 中?

如果问题有点基本,或者我遗漏了有关 XCode 或 react-native 应用程序开发工作流程的内容,我们深表歉意,感谢您的帮助!

标签: xcodereact-nativeexpo

解决方案


弄清楚了。我发生了两件事:

世博会换证

我必须登录 developer.apple.com 并删除我的密钥、配置文件和除https://developer.apple.com/account/resources/certificates/list下的 App ID 之外的任何其他数据

之后,我需要通过运行expo build:ios -c清除 Expo 存储在服务器上的证书来刷新我的 expo 证书。

无效的应用程序域

之后,我收到了另一个错误,因为其中列出的应用程序域不是associatedDomains以下内容:app.jsonmywebsite.com

{
  expo: {
    ...
    ios: {
      associatedDomains: [
        "applinks:mywebsite.com",
      ]
    }
  }
}

完成此操作后,构建继续以适当的权利提交到 testflight。


推荐阅读