iOS打包 遇到的[x86_64, i386]问题解决方案iTunes Store Operation Failed ERROR ITMS-90087 && ERROR ITMS-90535

本文介绍了解决iOS应用打包上传App Store时遇到的错误方法,包括移除不支持的架构和修正资源包配置问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

项目上架,打包遇到[x86_64, i386]问题,先把问题扔出来

    iTunes Store Operation Failed
    ERROR ITMS-90087: "Unsupported Architectures. The executable for MMMagazineReadList.app/Frameworks/HelpDesk.framework contains unsupported architectures '[x86_64]'."
     
    iTunes Store Operation Failed
    ERROR ITMS-90087: "Unsupported Architectures. The executable for MMMagazineReadList.app/Frameworks/HyphenateLite.framework contains unsupported architectures '[x86_64, i386]'."
     
    iTunes Store Operation Failed
    ERROR ITMS-90209: "Invalid Segment Alignment. The app binary at 'MMMagazineReadList.app/Frameworks/HelpDesk.framework/HelpDesk' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."

方法一:偶尔有用

刚刚开始找到的解决方案是让我加入一个脚本,具体如下(具体效果:第一次有效果,之后打包还是会遇到同样的问题,而且第二次过后就会效果失效,不知道原因,了解的大神请告知,谢谢)

在项目-->Build Phases -->Run Script  添加如下shell脚本,然后再试试打包。

    # Without further ado, here’s the script. Add a Run Script step to your build steps, put it after your step to embed frameworks, set it to use /bin/sh and enter the following script:
     
    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

 

方法二:亲测有用

由于该问题的产生原因是因为x86_64, i386是模拟器使用的,而打包上传appStore是不允许的,所以需要移除这个框架

我的项目里面因为有环信的原因,有HelpDesk.framework和HyphenateLite.framework包含了这个,所以需要到这两个framework下移除,具体操作如下:

    1、打开终端,进入你的framework的路径下(cd  /Users/MAC/Desktop/MyProject/HyphenateLite.framework)
     
    2、lipo -remove i386 HyphenateLite -o HyphenateLite && lipo -remove x86_64 HyphenateLite -o HyphenateLite
     
    【若有其他库,在进入,移除一下就好】
     
    3、重新打开项目,clean一下,Build一下,记住不要跑模拟器,然后打包,上传成功

 
ERROR ITMS-90535

报错信息如下

    ERROR ITMS-90535:"Unexpected CFBundleExecutable Key. The bundle at ‘XXX.app/EaseUIResource.bundle’ does not contain a bundle executable.
     If this bundle intentionally does not contain an executable, consider removing the CFBundleExecutable key from its Info.plist and using a CFBundlePackageType of BNDL.
     If this bundle is part of a third-party framework, consider contacting the developer of the framework for an update to address this issue.”

报错信息详细已经指出XXX.app/EaseUIResource.bundle中存在一个不可执行的字段,需要将此字段移除,即从报错可以看出是CFBundlePackageType字段需要删除;

我的项目是因为集成了环信人工互动云SDK,其中的HelpDeskUIResources.bundle中的info.plist文件移除了Executable file为key,HelpDeskResource为value的配置,问题解决!
---------------------  
作者:静井  
来源:优快云  
原文:https://blog.youkuaiyun.com/weixin_41953322/article/details/82788881  
版权声明:本文为博主原创文章,转载请附上博文链接!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值