简体   繁体   English

XCode:如何在上传之前验证IPA是否有效?

[英]XCode: How can I verify an IPA is valid before uploading?

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. 我得到了与钥匙串访问组的不匹配,但是它需要一段时间才能将IPA文件上传到TestFlight,然后才能告诉我该文件无效。 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. 我还想知道如何从IPA文件获取信息,以便我可以诊断并解决问题。 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. 我不知道它是如何失败的,因为我在调试/发布版本中使用相同的代码签名标识以及从存档中签署IPA。 I have no idea what is wrong or how to fix it. 我不知道有什么问题或如何解决它。

Any help is appreciated. 任何帮助表示赞赏。

If your Distribution Provisioning profile bundle identifier matches your App's bundle identifier (eg your bundle id is com.mycompany.appname and your App's bundle id has at least com.mycompany.* then you shouldn't run into this error. 如果您的Distribution Provisioning配置文件包标识符与您的App的包标识符匹配(例如,您的包ID是com.mycompany.appname,并且您的App的包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. 在Xcode 4.3中检查有效性反馈的另一种方法是存档应用程序,然后点击管理器的“存档”部分中的“验证”按钮。 (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.) (请注意,在iTunes Connect帐户中创建应用程序ID之前,它不允许您进行验证并提供“未找到应用程序记录”错误,并按照步骤进行操作,直到您将其设置为“等待”上传“。如果您尚未准备好上传到商店,请不要担心,您仍然可以在不上传任何内容的情况下进行验证。)

altool

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 itunesconnect@user.com -p password

You can use the altool that comes with Xcode 您可以使用Xcode附带的altool

  1. cd /Applications/Xcode.app/Contents/Applications/Application\\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/ cd /Applications/Xcode.app/Contents/Applications/Application \\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Versions/A/Support/
  2. ./altool --validate-app -f <'ipaFile'> ./altool --validate-app -f <'ipaFile'>

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. 如果它们不匹配,则签名过程必定存在问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM