一.入坑
今天將ipa包上傳iTunes Store的時候,發(fā)現(xiàn)錯誤ITMS-90087,如ITMS-90087圖所示.
問題出在DJISDK,于是前往官網(wǎng)尋找不包含模擬器架構(gòu)的framework,不知是隱藏的太深還是壓根就沒有不包含模擬器架構(gòu)的framework狰闪,一番查找之后發(fā)現(xiàn)沒有找到钦铺。發(fā)現(xiàn)網(wǎng)上出現(xiàn)我這種情況的很少维哈,記錄下來以防以后重新入坑脖捻。
二.爬坑
最終在一國外大神的博客中找到答案,進入Build Phases->New Run Script 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
將以上代碼
放入圖中所指區(qū)域即可邮绿。