提交到App Store问题:不支持的体系结构x86 [英] Submit to App Store issues: Unsupported Architecture x86

查看:558
本文介绍了提交到App Store问题:不支持的体系结构x86的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想尝试使用shopify API。当我存档应用程序并验证它然后没有问题但是当我将它提交到应用程序商店时它会给我以下问题。

So i am trying to use the shopify API. When i archive the app and validate it then there are no issues but when i submit it to the app store then it gives me the following issues.


  1. 错误ITMS-90087:不支持的架构。您的可执行文件包含不受支持的架构'[x86_64,i386]'。

  2. 错误ITMS-90209:无效的段对齐.SJAPP.app/Frameworks/Buy.framework/Buy上的应用程序二进制文件没有正确的段对齐。尝试使用最新的xcode版本重建应用程序。 (我已经在使用最新版本。)

  3. 错误ITMS-90125:二进制文件无效.LC_ENCRYPTION_INFO加载命令中的加密信息丢失或无效,或者二进制文件是已加密。这个二进制文件似乎不是用Apple的Linker构建的。

  4. 警告ITMS-90080:可执行文件有效载荷/..... Buy.framework不是一个位置独立可执行文件。请确保您的构建设置已配置为创建PIE可执行文件。

  1. ERROR ITMS-90087: "Unsupported Architecture. Your executable contains unsupported architecture '[x86_64, i386]'."
  2. ERROR ITMS-90209: "Invalid segment Alignment. The App Binary at SJAPP.app/Frameworks/Buy.framework/Buy does not have proper segment alignment. Try rebuilding the app with the latest xcode version." (I am already using the latest version.)
  3. ERROR ITMS-90125: "The Binary is invalid. The encryption info in the LC_ENCRYPTION_INFO load command is either missing or invalid, or the binary is already encrypted. This binary does not seem to have been built with Apple's Linker."
  4. WARNING ITMS-90080: "The Executable Payload/..../Buy.framework is not a Position Independent Executable. Please ensure that ur build settings are configured to create PIE executables."


推荐答案

问题是Buy框架包含模拟器(x86_64)和实际设备(ARM)的构建。

The problem is that the Buy framework contains a build for both the simulator (x86_64) and the actual devices (ARM).

当然,您不能提交在App Store中为不受支持的体系结构提供二进制文件,因此解决方案是在提交之前手动从最终二进制文件中删除不需要的体系结构。

Of course, you aren't allowed to submit to the App Store a binary for an unsupported architecture, so the solution is to "manually" remove the unneeded architectures from the final binary, before submitting it.

Daniel Kennett来了一个不错的解决方案并提供此脚本以添加到构建阶段:

Daniel Kennett came up with a nice solution and provides this script to add to the build phase:

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

# This script loops through the frameworks embedded in the application and
# removes unused architectures.
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
    FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
    FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
    echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"

    EXTRACTED_ARCHS=()

    for ARCH in $ARCHS
    do
        echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
        lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
        EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
    done

    echo "Merging extracted architectures: ${ARCHS}"
    lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
    rm "${EXTRACTED_ARCHS[@]}"

    echo "Replacing original executable with thinned version"
    rm "$FRAMEWORK_EXECUTABLE_PATH"
    mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"

done

我用它并且效果很好。

编辑:确保你看看Varrry发布的修改过的脚本,因为这个有一些小问题。

make sure you look at the modified script posted by Varrry, as this one has some minor issues.

这篇关于提交到App Store问题:不支持的体系结构x86的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆