XCode:如何在上传前验证 IPA 是否有效?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10823695/
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
XCode: How can I verify an IPA is valid before uploading?
提问by Brennan
I have a problem with creating IPA files and TestFlight is showing me this reason.
我在创建 IPA 文件时遇到问题,TestFlight 向我展示了这个原因。
http://help.testflightapp.com/customer/portal/articles/402843-mismatched-keychain-access-groups
http://help.testflightapp.com/customer/portal/articles/402843-mismatched-keychain-access-groups
I get a mismatch with keychain access groups but it takes a while to upload the IPA file to TestFlight before it can tell me the file is not valid. I'd like to test the file before I even upload it. I would also like to know how to get information abou the IPA file so that I can diagnose and fix the problem. I have no idea how it is failing since I am using the same Code Signing Identity in the Debug/Release builds as well as signing the IPA from the Archive. I have no idea what is wrong or how to fix it.
我与钥匙串访问组不匹配,但需要一段时间才能将 IPA 文件上传到 TestFlight,然后它才能告诉我该文件无效。我想在上传文件之前对其进行测试。我还想知道如何获取有关 IPA 文件的信息,以便我可以诊断和解决问题。我不知道它是如何失败的,因为我在调试/发布版本中使用相同的代码签名标识以及从存档中签署 IPA。我不知道出了什么问题或如何解决它。
Any help is appreciated.
任何帮助表示赞赏。
采纳答案by andycam
If your Distribution Provisioning profile bundle identifier matches your App's bundle identifier (eg your bundle id is com.mycompany.appnameand your App's bundle id has at least com.mycompany.*then you shouldn't run into this error.
如果您的分发供应配置文件包标识符与您的应用程序包标识符匹配(例如,您的包 ID 是com.mycompany.appname并且您的应用程序包 ID 至少为com.mycompany.*,那么您不应该遇到此错误。
Another way to check validity feedback in Xcode 4.3 is to archive the app, and hit the Validate button in the Archives section of your Organizer. (Note that it won't allow you to to validate and gives a 'No application records found' error until you've created an App ID in your iTunes Connect account, and followed the steps until you've set it to "Waiting for Upload ". Don't worry if you're not ready to upload to the store yet, you can still validate without uploading anything.)
在 Xcode 4.3 中检查有效性反馈的另一种方法是存档应用程序,然后点击管理器存档部分中的验证按钮。(请注意,在您在 iTunes Connect 帐户中创建应用程序 ID 之前,它不允许您验证并给出“未找到应用程序记录”错误,并按照步骤将其设置为“等待上传”。如果您还没有准备好上传到商店,请不要担心,您仍然可以在不上传任何内容的情况下进行验证。)
回答by Durai Amuthan.H
Go to terminal and use it like below
转到终端并使用它,如下所示
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool -v -f APP.ipa -u [email protected] -p password
回答by Febin
You can use the altool that comes with Xcode
可以使用Xcode自带的altool
- cd /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/
- ./altool --validate-app -f <'ipaFile'>
- cd /Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/
- ./altool --validate-app -f <'ipaFile'>
回答by shekh
You can use the command to extract entitlements info from the signed application:
您可以使用该命令从签名的应用程序中提取权利信息:
codesign -d --entitlements
Then try to compare it with the Entitlements part of provision profile. If they dont match there must be some problem with your signing process.
然后尝试将其与配置文件的权利部分进行比较。如果它们不匹配,则您的签名过程一定存在问题。