由于应用程序标识符授权,我无法安装watchOS 2 WatchKit应用程序。这发生在打开功能选项卡中的应用程序组之后。

完整的错误:

App安装失败 此应用程序的应用程序标识符授权与已安装应用程序的应用程序标识符授权不匹配。这些值必须匹配才能允许升级。

这是在物理设备上以调试模式运行应用程序。只运行iOS应用程序就可以了。

我再次关闭了应用程序组,并删除了添加的授权文件,但同样的错误。


当前回答

我也遇到了同样的问题,在搜索了几分钟后,我发现最简单的解决方案就是手动从设备中删除之前安装的应用程序,并尝试从Xcode中再次运行应用程序。

希望对你有所帮助。 愿一切都好!

其他回答

我遇到了这个问题,如果不删除并重新安装应用程序就无法解决这个问题(正如这里的一些人所建议的那样,打乱配置文件并没有帮助)。

但是,我并没有丢失现有的测试数据。对于将来遇到这种问题的人,以下是解决方法:

Before removing the app, open the Xcode "Devices" window (that's cmd-shift-2). Select your device and find your app in the "Installed Apps" list. Click on the gear icon and select "Download Container...". This will copy all of the app's data to your Mac. Save that somewhere for now. Delete the app and reinstall it from Xcode. Kill the app from Xcode (click the stop button), so it's not running. Back in the "Devices" window, click the gear icon and select "Replace Container...". Select the data that you downloaded to your Mac in step 3.

Xcode会恢复你之前保存的应用数据。 现在您已经恢复了旧的测试数据,应用程序应该可以运行了。

我有同样的错误,我解决了它通过改变Bundle Identifier的一些新的东西。之后,它建立项目没有任何问题。

我的步骤:

打开Xcode 进入“常规”选项卡 找到身份 将Bundle Identifier更改为新的内容。

以下是最终为我解决的问题(Xcode 11)。在运行Apple的示例项目“CoreDataCloudKitDemo”(WWDC 2019年会议202)时遇到了这个问题。

我在项目的“常规”设置中取消了“Mac”部署选项,并保持“自动管理签名”。现在它是一款iPhone/iPad应用,这个错误消失了,我可以开始开发了。

然后我重新检查了“Mac”选项,Xcode要求它应该做它的魔法来管理权利等;我同意了,Xcode解决了所有的问题,我得以构建Mac版本。

在对这个问题的大多数回答中,有一个关键的方面被最初的提问者忽略了。需要在不删除现有安装的情况下安装应用程序。在我的例子中,应用程序使用了一个SQLite数据库,为用户存储了相当多的数据。显然,如果你删除了应用,你就删除了数据。这是一种解决方案,能够让我以用户更新游戏的方式进行测试。

In my case, the issue was Xcode using a provisioning profile automatically generated by Xcode. This probably happened because I got a new computer and didn't transfer the distribution provisioning profile over. Not to mention, I had not updated the app in almost 2 years. So my original provisioning profile (which contains the Entitlements application-identifier) was long gone. Solution: in Xcode preferences-> Accounts-> Select the appropriate Apple ID-> View Details-> Under Provisioning Profiles, right-click on the Xcode-generated profile for that app (it's prefixed with XC iOS), and select Move to Trash.

在开发者网站上,用你的应用ID创建一个新的发行配置文件。下载新的配置文件,双击Xcode会自动安装它。相反,你可以返回到Xcode中列出的配置文件,点击新创建的配置文件旁边的下载按钮。构建应用程序并再次尝试运行。顺便说一下,我的Xcode设置为自动管理代码签名,除了这个问题,其他的工作都很好。

尽管我遵循了一些合乎逻辑的步骤:卸载应用程序,重建项目,但对我来说唯一有效的解决方案是:重新启动XCode。(XCode 8.1)