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

完整的错误:

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

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

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


当前回答

我今天遇到了同样的问题,通过更改之前安装在我iPhone上的应用程序的显示名称和包标识符来解决它。 步骤:

Xcode -> General tab -> Find Identity -> Change Bundle Identifier

所以,现在我有两个相同的应用程序具有相同的功能,但有两个不同的名称和身份。

其他回答

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

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

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设置为自动管理代码签名,除了这个问题,其他的工作都很好。

这很容易解决,从你的设备上删除你之前的应用程序。然后开始重新安装。这对我来说很好。

更改版本号和版本,如果设备中安装了以前的应用程序,请确保删除真实设备中所有已安装的应用程序

打开xcode ->窗口->设备

对于那些可能属于多个团队的人来说,这可能是你的问题:

如果应用程序的捆绑id是硬编码在你的信息。plist,那么Xcode就会感到困惑,然后就会发脾气。

修复:

确保bundle id设置为: $ (PRODUCT_BUNDLE_IDENTIFIER)