美文网首页iOS开发笔录
iOS universal framework

iOS universal framework

作者: 温特儿 | 来源:发表于2016-06-20 15:47 被阅读597次
    FRAMEWORK_NAME="${PROJECT_NAME}"
    #FRAMEWORK_NAME="YourFrameworkTargetName"
    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
    cd"${FRAMEWORK}"
    chmod644${FRAMEWORK_NAME}
    open"${FRAMEWORK}"
    

    command+B 编译,结果会弹出

    相关文章

      网友评论

        本文标题:iOS universal framework

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