目前在做SDK开发,每次打包都要分模拟器和真机,很费劲,填写如下脚本会把SDK合并
脚本如下:只需要替换成自己的工程名即可
#### TPIMessage
if [ "${ACTION}" = "build" ]
then
INSTALL_DIR_TPIMessage=${SRCROOT}/Products/${CONFIGURATION}-TPIMessage/TPIMessage.framework
DEVICE_DIR_TPIMessage=${BUILD_ROOT}/${CONFIGURATION}-iphoneos/TPIMessage/TPIMessage.framework
SIMULATOR_DIR_TPIMessage=${BUILD_ROOT}/${CONFIGURATION}-iphonesimulator/TPIMessage/TPIMessage.framework
if [ -d "${INSTALL_DIR_TPIMessage}" ]
then
rm -rf "${INSTALL_DIR_TPIMessage}"
fi
mkdir -p "${INSTALL_DIR_TPIMessage}"
cp -R "${DEVICE_DIR_TPIMessage}/" "${INSTALL_DIR_TPIMessage}/"
lipo -create "${DEVICE_DIR_TPIMessage}/${PROJECT_NAME}" "${SIMULATOR_DIR_TPIMessage}/${PROJECT_NAME}" -output "${INSTALL_DIR_TPIMessage}/${PROJECT_NAME}"
fi
脚本代码填写位置:
设置完成后,command+B,SDK就适用于模拟器和真机了