【问题标题】:ERROR ITMS-90502 App Store Upload - Xcode错误 ITMS-90502 应用商店上传 - Xcode
【发布时间】:2018-08-01 18:01:13
【问题描述】:

突然我们的项目没有正确上传到 App Store,我们在这一点上停止了:

错误信息:

错误 ITMS-90502:“无效的捆绑包。仅包含 arm64 切片的应用程序还必须在 Info.plist 的 UIRequiredDeviceCapabilities 列表中具有 'arm64'。”

我们都试过了,这是我们的 info.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Optimio</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>2</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSAllowsArbitraryLoadsInWebContent</key>
    <true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) upload your expense photos through camera and roll</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) upload your expense photos through camera and roll</string>
<key>UILaunchStoryboardName</key>
<string>Uploaders</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>arm64</string>
    <string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationPortraitUpsideDown</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

我们也有这个构建设置:

【问题讨论】:

    标签: ios iphone xcode upload app-store


    【解决方案1】:

    (我确实按照here 的建议尝试了安装后挂钩,但没有奏效)

    将以下 xml 添加到您的主要目标的 info.plist 文件中,

      <key>UIRequiredDeviceCapabilities</key>
      <array>
          <string>arm64</string>
      </array>
    

    然后将相同的 xml 添加到您的 pods 项目中的所有 info.plist 文件中(当然,如果您有一个 pods 项目)。

    您现在应该可以上传到 iTunes 连接。

    【讨论】:

    【解决方案2】:

    可能是 iTC 的变化导致了它,但实际上似乎有一个修复方法。

    我在我的(仅限 iOS11)项目中更正了所有扩展的 plist,以将 arm64 包含为要求 (UIRequiredDeviceCapabilities)。

    然后为 cocoapods 添加了这个 post install hook: https://twitter.com/aaron_pearce/status/966530631608881153

    现在上传成功,正在处理中。

    编辑:
    虽然这个解决方案是有效的,并且工作得很好,但它不再是必要的。似乎 iTC 已“修复”,现在(再次)接受未进行这些更改的构建。 https://forums.developer.apple.com/message/296129

    【讨论】:

    • 我不知道是不是 iTC 的更改导致了它...我工作的团队负责一个配套的 tvOS 和 iOS 应用程序,我昨天早上部署都很好,但是昨晚只部署了 iOS 应用程序,而 tvOS 应用程序遇到了这些问题。我已经运行了安装后挂钩并验证了密钥是在我的 pod plist 和我的所有框架 plist 中创建的,但仍然未能通过 iTC 上传验证。您还有其他建议吗?
    • 这是唯一对我有用的东西。 iTC 甚至在上传之前成功提交的构建时出现错误。
    【解决方案3】:

    这似乎是 Apple 最近对 ITC 验证所做的更改。以前将您的主项目标记为仅限于arm64 就足够了,但现在看起来您需要确保即使是嵌入式项目也被标记。这意味着Pods.proj 和任何Internal.proj 文件需要与主项目文件一起受到限制。

    不幸的是,现在 Cocoapods 默认构建支持 arm64、armv7 和 armv7s 的框架,这会导致这里出现问题。我可以通过将以下几行添加到我的 Podfile 来解决这个问题。

    post_install do |installer|
      installer.pods_project.build_configurations.each do |config|
        config.build_settings['VALID_ARCHS'] = 'arm64'
      end
    end
    

    希望这会有所帮助!

    来源: https://gist.github.com/alexpersian/e6ab115dc12f3d48eee0e7f27dfb567d

    编辑:(2018 年 2 月 23 日) 根据以下论坛主题,此问题似乎已在 iTC 方面得到解决。 https://forums.developer.apple.com/message/296129

    【讨论】:

      猜你喜欢
      • 2016-01-14
      • 1970-01-01
      • 1970-01-01
      • 2015-08-18
      • 2020-03-04
      • 1970-01-01
      • 2013-10-01
      • 1970-01-01
      • 2021-06-30
      相关资源
      最近更新 更多