zoukankan      html  css  js  c++  java
  • ios的framework合并

    # 运行此脚本前
    
    # 先编译一遍工程  确保正常运行 没有报错
    
     
    
     
    
    # 作为Xcode Aggregate运行
    
    # file-->new target-->cross-platform-->Aggregate
    
     
    
    #!/bin/sh
    
    UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
    
    WORKSPACE_NAME=${PROJECT_NAME}.xcodeproj
    
    # make sure the output directory exists
    
    mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
    
    # Step 1. Build Device and Simulator versions
    
    echo 'Step 1. Build Device and Simulator versions'
    
    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
    
    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
    
     
    
    # Step 2. Copy the framework structure (from iphoneos build) to the universal folder
    
    cp -R "${BUILD_DIR}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework" "${UNIVERSAL_OUTPUTFOLDER}/"
    
     
    
    # Step 3. Copy Swift modules from iphonesimulator build (if it exists) to the copied framework directory
    
    SIMULATOR_SWIFT_MODULES_DIR="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule/."
    
    if [ -d "${SIMULATOR_SWIFT_MODULES_DIR}" ]; then
    
    cp -R "${SIMULATOR_SWIFT_MODULES_DIR}" "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework/Modules/${PROJECT_NAME}.swiftmodule"
    
    fi
    
     
    
    # Step 4. Create universal binary file using lipo and place the combined executable in the copied framework directory
    
    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}"
    
     
    
    # Step 5. Convenience step to copy the framework to the project's directory
    
    cp -R "${UNIVERSAL_OUTPUTFOLDER}/${PROJECT_NAME}.framework" "${PROJECT_DIR}"
    
     
    
    # Step 6. Convenience step to open the project's directory in Finder
    
    open "${PROJECT_DIR}"
    

      

  • 相关阅读:
    Python将文件夹下的文件名写入excel方便统计
    Python利用openpyxl带格式统计数据(2)- 处理mysql数据
    Python利用openpyxl带格式统计数据(1)- 处理excel数据
    spfa 算法(队列优化的Bellman-Ford算法)
    bellman_ford算法(边数限制的最短路,边权可能为负)
    堆优化dijkstra
    朴素dijkstra
    1547. 切棍子的最小成本(区间dp)
    1546. 和为目标值的最大数目不重叠非空子数组数目(前缀和+dp)
    32场双周赛(模拟,模拟,前缀和加状态压缩)
  • 原文地址:https://www.cnblogs.com/nuanshou/p/10508923.html
Copyright © 2011-2022 走看看