fatal error: lipo: can't open input file: /Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-hbrpjfklispwrhcdyebqvnnnlyyh/Build/Products/Debug-iphoneos/Wifi.app/Frameworks/SQLite.framework/SQLite-arm64 (No such file or directory)
fatal error: lipo: can't open input file: /Users/xxxx/Library/Developer/Xcode/DerivedData/xxxx-hbrpjfklispwrhcdyebqvnnnlyyh/Build/Products/Debug-iphoneos/Wifi.app/Frameworks/Kingfisher.framework/Kingfisher-arm64 (No such file or directory)
運(yùn)行之前的項(xiàng)目评疗,發(fā)現(xiàn)第一次能運(yùn)行成功沾鳄,第二次再運(yùn)行就失敗勋篓,報(bào)以上錯(cuò)誤,初步判斷應(yīng)該是緩存引起的艇炎,刪除生成緩存的文件夾,可以運(yùn)行,但是第二次還是報(bào)錯(cuò)应结,網(wǎng)上找了一圈辦法,試了都不起作用泉唁,最后刪除運(yùn)行的腳本代碼鹅龄,問(wèn)題解決,記錄一下亭畜。TARGETS -> Build Phases -> Run Script 刪除里面的腳本代碼
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
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
把這些刪除之后扮休,清理一下工程(cmd + shift + k),重新運(yùn)行,問(wèn)題解決