美文网首页
工程添加framework提交审核报错 ERROR ITMS-9

工程添加framework提交审核报错 ERROR ITMS-9

作者: Kid_Lee | 来源:发表于2017-03-02 14:00 被阅读97次

    工程中添加了新的framework,在打包上传至AppStore如果出现以下错误,则说明自建的这个SDK里面包含了x86_64, i386 架构,这个在AppStore是不允许的,所有会在上传的时候报错,解决办法就是要这个SDK剔除掉x86_64, i386这两个架构,参考Daniel Kennett的一篇blog

    ERRORITMS-90087: "Unsupported Architectures. The executable for ***.app/Frameworks/SDK.framework contains unsupported architectures '[x86_64, i386]'."ERRORITMS-90362: "Invalid Info.plist value. The value for the key 'MinimumOSVersion' in bundle ***.app/Frameworks/SDK.framework is invalid. The minimum value is 8.0"ERRORITMS-90209: "Invalid Segment Alignment. The app binary at '***.app/Frameworks/SDK.framework/SDK' does not have proper segment alignment. Try rebuilding the app with the latest Xcode version."ERRORITMS-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."

    解决办法:TARGETS->Build Phases->点击加号选择New Run Script Phase->然后复制粘贴下面代码  搞掂上架

    Without further ado, here’s the script. Add a Run Script step to your build steps, put it after your step to embed frameworks,setit 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 |whileread-r FRAMEWORKdoFRAMEWORK_EXECUTABLE_NAME=$(defaultsread"$FRAMEWORK/Info.plist"CFBundleExecutable)FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"echo"Executable is$FRAMEWORK_EXECUTABLE_PATH"EXTRACTED_ARCHS=()forARCHin$ARCHSdoecho"Extracting$ARCHfrom$FRAMEWORK_EXECUTABLE_NAME"lipo -extract"$ARCH""$FRAMEWORK_EXECUTABLE_PATH"-o"$FRAMEWORK_EXECUTABLE_PATH-$ARCH"EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")doneecho"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

    相关文章

      网友评论

          本文标题:工程添加framework提交审核报错 ERROR ITMS-9

          本文链接:https://www.haomeiwen.com/subject/gfghgttx.html