码迷,mamicode.com
首页 > 其他好文 > 详细

xcode10不兼容问题,framework编译脚本

时间:2019-02-25 18:58:41      阅读:448      评论:0      收藏:0      [点我收藏+]

标签:div   hone   pie   module   The   exe   swift   ace   imu   

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}"

 

xcode10不兼容问题,framework编译脚本

标签:div   hone   pie   module   The   exe   swift   ace   imu   

原文地址:https://www.cnblogs.com/nuanshou/p/10432200.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!