xcode iOS 升级测试 - 应用程序标识符权利不匹配
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39631530/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Upgrade testing for iOS - application-identifier entitlement does not match
提问by ArdenDev
Previously with Xcode 7.3.1 I was able to build directly over my app store app on my iPad and test the upgrade scenario, which worked perfectly fine. This week I upgraded to Xcode 8 and when I try the exact same approach, I keep getting this upgrade error
以前使用 Xcode 7.3.1,我能够直接在 iPad 上的应用商店应用程序上构建并测试升级方案,效果非常好。本周我升级到 Xcode 8,当我尝试完全相同的方法时,我不断收到此升级错误
"This application's application-identifier entitlement does not match that of the installed application. These values must match for an upgrade to be allowed."
“此应用程序的应用程序标识符权利与已安装应用程序的不匹配。这些值必须匹配才能允许升级。”
I tried multiple solutions posted on this thread and none of them worked. I also don't have a watch app. Just a simple iOS app target.
我尝试了在此线程上发布的多种解决方案,但都没有奏效。我也没有手表应用程序。只是一个简单的 iOS 应用程序目标。
App installation failed due to application-identifier entitlement
I deleted my certs and provisioning profiles and recreated them and still the same problem. I then went and downloaded Xcode 7.3.1 and tried it again with the exact same problem.
我删除了我的证书和配置文件并重新创建了它们,但仍然是同样的问题。然后我去下载 Xcode 7.3.1 并再次尝试使用完全相同的问题。
Now I am stuck without being able to fully test my upgrade scenario.
现在我无法完全测试我的升级方案。
PLEASE HELP !!
请帮忙 !!
回答by HammerSlavik
I had the same issue while trying to upgrade application. And here what I've found:
我在尝试升级应用程序时遇到了同样的问题。在这里,我发现了什么:
I checked application-identifier entitlements of old app and new app. You can do that by running codesign -d --entitlements :- path/to/AppName.app/AppName
or open file "archived-expanded-entitlements.xcent" at path "AppName.app/AppName".
我检查了旧应用程序和新应用程序的应用程序标识符权利。您可以通过codesign -d --entitlements :- path/to/AppName.app/AppName
在路径“AppName.app/AppName”中运行或打开文件“archived-expanded-entitlements.xcent”来实现。
Application-identifier of old app was "1234XXX5X6.com.mycompany.myapp" but in new app it was "1234XXX5X6.com.mycompany.myapp.develop".
旧的应用程序的应用程序标识符是“1234XXX5X6.com.mycompany.myapp”,但在新的应用程序,这是“1234XXX5X6.com.mycompany.myapp。发展”。
Usually I set "Bundle Identifier" directly in Info.plist.
通常我直接在Info.plist 中设置“ Bundle Identifier” 。
But I didn't know that there is also a "Product Bundle Identifier" property in project Build Settings.
但我不知道项目Build Settings 中还有一个“ Product Bundle Identifier”属性。
The previousversion of app was built with Xcode 7.3.1 and it had following settings:
在以前的应用程序的版本在Xcode 7.3.1建,它有如下设置:
- Info.plist: com.mycompany.myapp
- Build Settings: com.mycompany.myapp.develop
- application-identifier: 1234XXX5X6.com.mycompany.myapp
- 信息.plist:com.mycompany.myapp
- 构建设置:com.mycompany.myapp。发展
- 应用程序标识符:1234XXX5X6.com.mycompany.myapp
The newversion was built with Xcode 8.2.1 and it had following settings:
该新版本在Xcode 8.2.1建,它有如下设置:
- Info.plist: com.mycompany.myapp
- Build Settings: com.mycompany.myapp.develop
- application-identifier: 1234XXX5X6.com.mycompany.myapp.develop
- 信息.plist:com.mycompany.myapp
- 构建设置:com.mycompany.myapp。发展
- 应用程序标识符:1234XXX5X6.com.mycompany.myapp。发展
Seems like new Xcode have different source for application-identifier. So I just corrected "Product Bundle Identifier" and my problem was solved.
似乎新的 Xcode 有不同的应用程序标识符来源。所以我只是更正了“产品包标识符”,我的问题就解决了。
回答by Vineesh TP
Remove the existing application from the device and Run again.
从设备中删除现有应用程序并再次运行。
回答by Satish Mavani
To fix this just enable "Automatic manage signing" from general tab of project settings.
要解决此问题,只需从项目设置的常规选项卡中启用“自动管理签名”。
I had also problem for running app on my device directly from xcode 8. Deleting and generation profile and certificate did not worked for me. But enabling "Automatic manage signing" worked for me.
我也遇到了直接从 xcode 8 在我的设备上运行应用程序的问题。删除和生成配置文件和证书对我不起作用。但是启用“自动管理签名”对我有用。
Hope this helps!
希望这可以帮助!
Check this question of mine: Xcode 8 shows error that provisioning profile doesn't include signing certificate
检查我的这个问题: Xcode 8 显示配置文件不包含签名证书的错误
回答by Mark A. Durham
Here is one solution if you want to upgrade over your existing App Store app without deleting it but your application-identifier entitlement does not match. Upload an archive of your new build to the App Store and then use TestFlight to download it to your device. This is not as quick as building to the device, but it will overwrite your old app with your new build while keeping your old data in place. For (relatively) quicker turn-around testing of your upgrade process once you have a new build available on TestFlight:
如果您想在不删除现有 App Store 应用程序的情况下对其进行升级,但您的应用程序标识符权利不匹配,则这是一种解决方案。将新构建的存档上传到 App Store,然后使用 TestFlight 将其下载到您的设备。这不像构建到设备那么快,但它会用新构建覆盖旧应用程序,同时保留旧数据。一旦您在 TestFlight 上有可用的新版本,为了(相对)更快地测试您的升级过程:
- Delete your app off of your device (assuming it was a recent build)
- Download your app store build and generate some data
- Download your TestFlight build, but don't run it
- Build your newest build directly to the device
- 从您的设备上删除您的应用程序(假设它是最近的版本)
- 下载您的应用商店版本并生成一些数据
- 下载您的 TestFlight 版本,但不要运行它
- 直接在设备上构建您的最新版本
The TestFlight build overwrites the entitlement without deleting the old data, so Xcode happily will install your new build over the TestFlight build, but you are still testing your upgrade process as if you were building directly on top of the App Store version of your app.
TestFlight 版本会覆盖授权而不删除旧数据,因此 Xcode 会很高兴地将您的新版本安装在 TestFlight 版本上,但您仍在测试升级过程,就好像您是直接在应用程序的 App Store 版本之上构建一样。
回答by Parth
Select the App Target and click on General, if you select or ticked checkbox automatically manage signing.
选择 App Target 并单击 General,如果您选择或勾选复选框自动管理签名。
Untick this automatically manage signing and select appropriate signing provisioning profile and #Build and run again.
取消选中此自动管理签名并选择适当的签名配置文件和#Build 并再次运行。
See the below photo.
请看下面的照片。
回答by Alex Barti?
I got this from an .ipa generated as a Jenkins artefact. The problem for me was that Jenkins was using a different provisioning profile.
我从作为 Jenkins 人工制品生成的 .ipa 中得到了这个。我的问题是 Jenkins 使用了不同的配置文件。
I manually set Jenkins to use the same profile as the updated version that I was trying to install, and it started working.
我手动将 Jenkins 设置为使用与我尝试安装的更新版本相同的配置文件,然后它开始工作。