zoukankan      html  css  js  c++  java
  • xcode10不兼容问题解决方法,framework编译脚本

    XCode10报错:Build/Intermediates.noindex/XCBuildData/build.db": disk I/O error

    更改-scheme 为-target

     1 # 运行此脚本前
     2 
     3 # 先编译一遍工程  确保正常运行 没有报错
     4 
     5  
     6 
     7  
     8 
     9 # 作为Xcode Aggregate运行
    10 
    11 # file-->new target-->cross-platform-->Aggregate
    12 
    13  
    14 
    15 #!/bin/sh
    16 
    17 UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
    18 
    19 WORKSPACE_NAME=${PROJECT_NAME}.xcodeproj
    20 
    21 # make sure the output directory exists
    22 
    23 mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
    24 
    25 # Step 1. Build Device and Simulator versions
    26 
    27 echo 'Step 1. Build Device and Simulator versions'
    28 
    29 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
    30 
    31 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
    32 
    33  
    34 
    35 # Step 2. Copy the framework structure (from iphoneos build) to the universal folder
    36 
    37 cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"
    38 
    39  
    40 
    41 # Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory
    42 
    43 SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/."
    44 
    45 if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then
    46 
    47 cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule"
    48 
    49 fi
    50 
    51  
    52 
    53 # Step 4. Create universal binary file using lipo and place the combined executable in the copied framework directory
    54 
    55 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}"
    56 
    57  
    58 
    59 # Step 5. Convenience step to copy the framework to the project's directory
    60 
    61 cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}"
    62 
    63  
    64 
    65 # Step 6. Convenience step to open the project's directory in Finder
    66 
    67 open "${PROJECT_DIR}"
  • 相关阅读:
    ASP.NET MVC中多种ActionResult用法总结
    jQuery中异步操作对象Deferred
    jQuery中bind方法和live方法区别解析
    深入理解Javascript中this, prototype, constructor
    SQL及常见的三种类型注释
    SQLServer的两个日期相减(间隔)datediff函数
    SQLServer查询进程与死锁语句
    SqlServer获取当前日期的详细写法
    SQL中 Decode 和 Sign 语法的简单用法
    数据仓库模型之CDM、LDM与PDM的区别
  • 原文地址:https://www.cnblogs.com/nuanshou/p/10432200.html
Copyright © 2011-2022 走看看