动态库framework

2017-08-29  本文已影响8人  佐筱猪

1.创建


WX20170829-140656@2x.png

2.配置头文件


WX20170829-140828@2x.png
3.添加合并脚本 WX20170829-141457@2x.png
if [ "${ACTION}" = "build" ]
then
INSTALL_DIR=${SRCROOT}/Products/${PROJECT_NAME}.framework
DEVICE_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphoneos/${PROJECT_NAME}.framework
SIMULATOR_DIR=${BUILD_ROOT}/${CONFIGURATION}-iphonesimulator/${PROJECT_NAME}.framework
if [ -d "${INSTALL_DIR}" ]
then
rm -rf "${INSTALL_DIR}"
fi
mkdir -p "${INSTALL_DIR}"
cp -R "${DEVICE_DIR}/" "${INSTALL_DIR}/"
#ditto "${DEVICE_DIR}/Headers" "${INSTALL_DIR}/Headers"
lipo -create "${DEVICE_DIR}/${PROJECT_NAME}" "${SIMULATOR_DIR}/${PROJECT_NAME}" -output "${INSTALL_DIR}/${PROJECT_NAME}"
open "${DEVICE_DIR}"
open "${SRCROOT}/Products"
fi

4.使用

使用时会报错(Reason: Image Not Found)
解决方法

WX20170829-142812@2x.png

5.其他
iOS同一项目多个Target的快速实现方法 - 两种使用场景详解

上一篇下一篇

猜你喜欢

热点阅读