由于应用程序标识符授权,我无法安装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会恢复你之前保存的应用数据。 现在您已经恢复了旧的测试数据,应用程序应该可以运行了。

在对这个问题的大多数回答中,有一个关键的方面被最初的提问者忽略了。需要在不删除现有安装的情况下安装应用程序。在我的例子中,应用程序使用了一个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设置为自动管理代码签名,除了这个问题,其他的工作都很好。

我从5s移到6s后收到了这个错误。 我从旧iPhone的备份中恢复了新的6s。 因此,在新iPhone上安装了旧应用程序。

旧的应用程序没有出现在6s的“已安装的应用程序”列表中! 我手动删除了iphone 6s上的这个旧应用程序,一切正常。

删除任何以前版本的应用程序从您的iPhone,然后清洁->构建和运行再次。你的应用应该在你的设备上平稳运行。

另外,在尝试直接在设备上运行项目时,请确保您没有在项目设置中选择分发证书。

上面的答案对我都没用。 我的问题是:我从Testflight安装了一个应用版本,所以我删除了旧的应用和Testflight版本,然后它又开始工作了。