iOS 应用程序的手表应用程序伴侣的捆绑 ID

问题描述 投票:0回答:1

我有一个带有捆绑包标识符 com.mybundleid 的 iOS 应用程序。我添加了一个新的手表操作系统应用程序目标。我正在使用 Xcode 15.1,似乎不再需要手表扩展。

当我将手表应用程序目标的捆绑 ID 设置为 com.mybundleid.watchkitapp 时,iOS 应用程序和手表应用程序已正确配对,我可以从一个应用程序发送消息到另一个应用程序。 但是,如果我尝试将存档分发到 App Store,Xcode 会失败并输出以下错误:

Failed Registering Bundle Identifier

The app identifier "com.mybundleid.watchkitapp" cannot be registered to your development team because it is not available. Change your bundle identifier to a unique string to try again.

No profiles for 'com.mybundleid.watchkitapp' were found

Xcode couldn't find any iOS App Store provisioning profiles matching 'com.mybundleid.watchkitapp'.

如果我将捆绑 ID 后缀更改为其他内容,例如 com.mybundleid.watchkitapp2,那么我可以将存档分发到 App Store,但两个应用程序无法通信。

处理与现有 iOS 应用程序一起运行的手表应用程序的捆绑 ID 的正确方法是什么?

ios xcode apple-watch watchos watchconnectivity
1个回答
0
投票

您需要使用“com.mybundleid.watchkitapp”捆绑包标识符注册一个配置文件,如下所示:

希望有帮助!

© www.soinside.com 2019 - 2024. All rights reserved.