美文网首页
一次性生成所有的framework包

一次性生成所有的framework包

作者: smile丶淡然 | 来源:发表于2019-05-05 10:57 被阅读0次

    参考地址:http://blog.csdn.net/zwl492454828/article/details/55095422

    framework包设置更改:

    脚本信息:

    #一次性生成所有芯片类型的包

    FRAMEWORK_NAME="LeYaoXiu"

    SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework"

    DEVICE_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphoneos/${FRAMEWORK_NAME}.framework"

    UNIVERSAL_LIBRARY_DIR="${BUILD_DIR}/${CONFIGURATION}-iphoneuniversal"

    FRAMEWORK="${UNIVERSAL_LIBRARY_DIR}/${FRAMEWORK_NAME}.framework"

    xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphonesimulator -arch i386 -arch x86_64 -target ${FRAMEWORK_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphonesimulator | echo

    xcodebuild -project ${PROJECT_NAME}.xcodeproj -sdk iphoneos -arch arm64 -arch armv7 -arch armv7s -target ${FRAMEWORK_NAME} -configuration ${CONFIGURATION} clean build CONFIGURATION_BUILD_DIR=${BUILD_DIR}/${CONFIGURATION}-iphoneos | echo

    rm -rf "${UNIVERSAL_LIBRARY_DIR}"

    mkdir "${UNIVERSAL_LIBRARY_DIR}"

    mkdir "${FRAMEWORK}"

    cp -r "${DEVICE_LIBRARY_PATH}/." "${FRAMEWORK}"

    lipo "${SIMULATOR_LIBRARY_PATH}/${FRAMEWORK_NAME}" "${DEVICE_LIBRARY_PATH}/${FRAMEWORK_NAME}" -create -output "${FRAMEWORK}/${FRAMEWORK_NAME}" | echo

    open "${FRAMEWORK}"

    ##############################################################################################################

    # 把编译后的.framework和第三方库/bundle文件拷贝到 app 的 ModuleFrameworks 目录下

    FMK_NAME=${PROJECT_NAME}

    INSTALL_DIR=${SRCROOT}/../../LeYaoGo/ModuleFrameworks/${PROJECT_NAME}

    ditto "${BUILT_PRODUCTS_DIR}/${FMK_NAME}.framework" "${INSTALL_DIR}/${FMK_NAME}.framework"

    相关文章

      网友评论

          本文标题:一次性生成所有的framework包

          本文链接:https://www.haomeiwen.com/subject/lnensttx.html