XCode10报错:Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error
更改-scheme 为-target
1 #!/bin/sh 2 UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal 3 WORKSPACE_NAME=${PROJECT_NAME}.xcodeproj 4 # make sure the output directory exists 5 mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" 6 # Step 1. Build Device and Simulator versions 7 echo ‘Step 1. Build Device and Simulator versions‘ 8 xcodebuild -project "${WORKSPACE_NAME}" -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphoneos ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build 9 xcodebuild -project "${WORKSPACE_NAME}" -target "${PROJECT_NAME}" -configuration ${CONFIGURATION} -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO BUILD_DIR="${BUILD_DIR}" BUILD_ROOT="${BUILD_ROOT}" clean build 10 11 # Step 2. Copy the framework structure (from iphoneos build) to the universal folder 12 cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/" 13 14 # Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory 15 SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/." 16 if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then 17 cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule" 18 fi 19 20 # Step 4. Create universal binary file using lipo and place the combined executable in the copied framework directory 21 lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/${PROJECT_NAME}" "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework/${PROJECT_NAME}" 22 23 # Step 5. Convenience step to copy the framework to the project‘s directory 24 cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}" 25 26 # Step 6. Convenience step to open the project‘s directory in Finder 27 open "${PROJECT_DIR}"
原文地址:https://www.cnblogs.com/nuanshou/p/10432200.html
时间: 2024-11-10 21:51:55