升级后,XCode 在存档时给出“包不包含 Info.plist”错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26630970/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 06:01:51  来源:igfitidea点击:

After Upgrading, XCode gives "The Package Does Not Contain an Info.plist" error when Archiving

iosiphonexcode

提问by dmccall

I have an iOS 7 app in the app store which has many in-app purchases. The in-app purchases are simply new .json data structures that I have hosted with Apple. The IAPs used to submit perfectly, but I just upgraded to XCode 6.1 when I upgraded my machine from Mountain Lion to Yosemite. Now whenever I archive a new IAP package or rearchive an old one that submitted properly last week, I get:

我在应用商店中有一个 iOS 7 应用,它有很多应用内购买。应用内购买只是我在 Apple 托管的新 .json 数据结构。IAP 曾经完美提交,但当我将我的机器从 Mountain Lion 升级到 Yosemite 时,我刚刚升级到 XCode 6.1。现在,每当我存档新的 IAP 包或重新存档上周正确提交的旧包时,我都会得到:

"Unable to validate your application. The package does not contain an Info.plist".

“无法验证您的应用程序。该包不包含 Info.plist”。

When I click on my target (in the Navigator pane), Build Settings | Packaging shows:

当我单击我的目标(在导航器窗格中)时,Build Settings | 包装显示:

  • Info.plist Fileas "north_carolina.pittsburgh/ContentInfo.plist". (Debug and Release subheadings show the same information).
  • Product Nameis "north_carolina.pittsburgh".
  • Info.plist 文件为“north_carolina.pittsburgh/ContentInfo.plist”。(调试和发布副标题显示相同的信息)。
  • 产品名称是“north_carolina.pittsburgh”。

The ContentInfo.plist file is in the Supporting Files folder of my target (in the Navigator pane). In it I have keys for

ContentInfo.plist 文件位于我的目标的 Supporting Files 文件夹中(在导航器窗格中)。在里面我有钥匙

  • ContentVersion (value set to 2.0)
  • IAPProductIdentifier
  • Bundle versions string, short (value set to 2.0)
  • 内容版本(值设置为 2.0)
  • IAP产品标识符
  • 捆绑版本字符串,短(值设置为 2.0)

Finally, in the Products folder of the Navigator, I have north_carolina.pittsburgh next to the red target icon, and the words are in red.

最后,在导航器的Products 文件夹中,我在红色目标图标旁边有north_carolina.pittsburgh,字样是红色的。

How can I get this archive to validate properly?

我怎样才能让这个档案正确验证?

回答by adjwilli

The error message is incorrect. What it's really erroring out on is that your "version" and "bundle" number strings probably aren't both set. Make sure you specify both in the Identity section. enter image description here

错误信息不正确。真正错误的是您的“版本”和“捆绑”数字字符串可能没有同时设置。确保在身份部分中指定两者。 在此处输入图片说明

回答by mpprdev

This seems to be XCode 6.1 bug. However you can actually ignore the error and proceed to export as an installer package (.pkg file will be created). Use this .pkg in the Application Loader.

这似乎是 XCode 6.1 的错误。但是,您实际上可以忽略该错误并继续导出为安装程序包(将创建 .pkg 文件)。在应用程序加载器中使用此 .pkg。

回答by Wrku

I ran into the same issue with the Xcode Archiver but I was able to submit using the Application Loader. Here are the steps I followed:

我在使用 Xcode Archiver 时遇到了同样的问题,但我能够使用 Application Loader 提交。以下是我遵循的步骤:

  1. Open Application Loader and select New In-App Purchaseand click the Choosebutton
  2. A new pop-up opens with your app list from iTunes Connect. Click on the app for which you're adding the in-app purchase, and then click the Managebutton.
  3. You should see the list of in-app purchases you've created for your app. Select the in-app purchase you're uploading. Then click the Hosted Contenttab at the bottom of the pop-up window.
  4. The window should update with a new section that says Hosted Content Package. Click the Choose...button and find the .pkg file you exported from the Archiver. Then click the Nextbutton.
  5. You should get the message Validation completed. Your package has validated correctly.Click Deliverand you should see the message Uploaded package to the iTunes Store.
  1. 打开 Application Loader 并选择New In-App Purchase并点击选择按钮
  2. 一个新的弹出窗口会打开,其中包含来自 iTunes Connect 的应用程序列表。单击您要为其添加应用内购买的应用,然后单击管理按钮。
  3. 您应该会看到您为应用创建的应用内购买列表。选择您要上传的应用内购买项目。然后单击弹出窗口底部的托管内容选项卡。
  4. 窗口应该更新为一个新的部分,上面写着Hosted Content Package。单击“选择...”按钮并找到您从 Archiver 导出的 .pkg 文件。然后单击下一步按钮。
  5. 您应该收到消息 验证已完成。您的包裹已正确验证。单击“交付”,您应该会看到消息Uploaded package to the iTunes Store

If you go to your in-app purchase in iTunes Connect you should see the package you just uploaded under the Hosting Content With Apple section. Hope this helps!

如果您在 iTunes Connect 中进行应用内购买,您应该会在Hosting Content With Apple 部分下看到您刚刚上传的包。希望这可以帮助!

回答by Hassan Malik

Set "Bundle OS Type code" as "APPL" it solved my problem , but you have to ensure that its in your project directory , include short and version string.

将“Bu​​ndle OS Type code”设置为“APPL”它解决了我的问题,但你必须确保它在你的项目目录中,包括短和版本字符串。

回答by mr_dami

I had the same problem, it turned out to be a problem with spaces in the .app name. Make sure the product name does not have any

我遇到了同样的问题,结果是 .app 名称中的空格有问题。确保产品名称没有任何

回答by tomsoft

In fact, it appears that the organizer does not provides the information if there is an error.

事实上,如果出现错误,主办方似乎不会提供信息。

The best is to: - export the file as an ipa - use application loader

最好是: - 将文件导出为 ipa - 使用应用程序加载器

Then you will have a DETAILLED explanation about the issue

然后你会有一个关于这个问题的详细解释

In my case, the error was that the architecture was Arm7 (on an old project) while the request now is to be 'standard (arm7/arm8/arm64) as well a CFBundlePackageType entry.

就我而言,错误是架构是 Arm7(在旧项目中),而现在的请求是“标准(arm7/arm8/arm64)以及 CFBundlePackageType 条目。”