xcode 将构建加载到 iTunes Connect 时出现无效的代码签名权利错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/36569882/
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
Invalid Code Signing Entitlements errors when loading build to iTunes Connect
提问by kelin
My iOS app has a keyboardand an app groupfor communication.
我的 iOS 应用程序有一个键盘和一个用于通信的应用程序组。
When I try to upload build using Application Loader, I get the following errors:
当我尝试使用Application Loader上传构建时,出现以下错误:
ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: 'MYTEAM.iphone.MAINAPP' for the key 'application-identifier' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard'"
ERROR ITMS-90163: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'aps-environment' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard'."
ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'MYTEAM.iphone.MAINAPP' for key 'application-identifier' in 'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
错误 ITMS-90164:“无效的代码签名权利。您的应用程序包签名中的权利与配置文件中包含的权利不匹配。根据配置文件,该包包含不允许的键值:‘MYTEAM .iphone.MAINAPP' 用于'Payload/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard' 中的关键'application-identifier'"
错误 ITMS-90163:“无效的代码签名权利。您的应用程序包签名中的权利与配置文件中包含的权利不匹配。该包包含一个未包含在配置文件中的密钥:‘aps-environment’在“有效负载/MAINAPP.app/PlugIns/Keyboard.appex/Keyboard”中。”
错误 ITMS-90046:“无效的代码签名权利。您的应用程序包的签名包含 iOS 不支持的代码签名权利。特别是,'Payload/MAINAPP.app 中的键'应用程序标识符'的值'MYTEAM.iphone.MAINAPP'不支持 /PlugIns/Keyboard.appex/Keyboard'。该值应该是一个以您的 TEAMID 开头的字符串,后跟一个点 '.',然后是包标识符。
So, obviously, application-identifierof compiled keyboard is wrong, and also it contains key aps-environmentwhich is redundant. I don't understand why. I triple checked all identifiers in Xcode, provision profiles and app ids in membercenter. Everything is ok. I also deleted all derived data, caches, restarted Xcode several times but it didn't help.
因此,显然,编译键盘的应用程序标识符是错误的,并且它包含冗余的关键aps-environment。我不明白为什么。我对 Xcode 中的所有标识符、membercenter 中的配置文件和应用程序 ID 进行了三次检查。一切都好。我还删除了所有派生数据、缓存,多次重新启动 Xcode,但没有帮助。
采纳答案by kelin
I was creating an .ipa file from archive with help of command line:
我在命令行的帮助下从存档创建了一个 .ipa 文件:
xcodebuild -exportArchive -archivePath $'MyAppArchive.xcarchive' -exportPath $”MyApp” -exportFormat ipa -exportProvisioningProfile Provisioning_Profile_Name
With only one provisioning profile specified. That was the problem.
仅指定了一个配置文件。那就是问题所在。
Problem could be solved if one specify both profiles for app and for keyboard (stackoverflow question). Or you can simply create .ipa using Xcode, as I did.
如果同时指定应用程序和键盘的配置文件(stackoverflow 问题),问题就可以解决。或者您可以像我一样简单地使用 Xcode 创建 .ipa。
回答by gklka
Cleaning project and deleting ~/Library/Developer/Xcode/DerivedData, then rebuilding did the trick for me.
清理项目并删除 ~/Library/Developer/Xcode/DerivedData,然后重建对我有用。
回答by Kiran K
回答by Muhammad Burhan
What you can try is
1- CLEAN the Project, Delete all custom precompiled Frameworks you are using, and the Make the Build. Hope it will solve your problem.
您可以尝试
1- CLEAN the Project,删除您正在使用的所有自定义预编译框架,以及 Make the Build。希望它能解决你的问题。
2- Add application-identifier specifying the correct application bundle ID inside Entitlements.plist. Then include the plist in the Build Options > iOS Bundle Signing
2- 添加应用程序标识符,在 Entitlements.plist 中指定正确的应用程序包 ID。然后在 Build Options > iOS Bundle Signing 中包含 plist