我有一个包含我的项目和Pod的工作区(称为A)。另外,当我开始调试时,我有一个可以转到其他目录(文件夹)并运行另一个Xcode项目(称为B)的脚本(即我的框架项目),完成该项目“ B”调试后,它将生成二进制框架,然后工作区“ A”项目将获取该二进制框架并复制到相关文件夹中。但是,当我将其存档时,我缺少框架项目“ B”的.dsym文件。为什么我需要.dsym,如果是否有与框架项目“ B”相关的崩溃,并且我的App存档中有.dsym文件,能够检查崩溃日志中的原因。预先提供任何帮助和感谢。
我的主项目工作区脚本
set -e
if [ -d "${PROJECT_DIR}/Frameworks" ]; then
rm -rf "${PROJECT_DIR}/Frameworks"
fi
mkdir "${PROJECT_DIR}/Frameworks"
#FRAMEWORKS_PATH="${PROJECT_DIR}/../Frameworks"
xcodebuild -project "${PROJECT_DIR}/../iOS/Frameworks/ss/SDK.xcodeproj" -scheme "SDKAggregate" -sdk "iphoneos" -configuration "Build"
cp -r ${PROJECT_DIR}/../iOS/Frameworks/sdk/"SDK.framework" "${PROJECT_DIR}/Frameworks"
我的框架汇总RunScript
# Merge Script
# 1
# Set bash script to exit immediately if any commands fail.
set -e
# 2
# Setup some constants for use later on.
FRAMEWORK_NAME="SDK"
OUTPUT_PATH="${SRCROOT}"
# 3
# If remnants from a previous build exist, delete them.
if [ -d "${SRCROOT}/build" ]; then
rm -rf "${SRCROOT}/build"
fi
# 4
# Build the framework for device and for simulator (using
# all needed architectures).
xcodebuild -target "${FRAMEWORK_NAME}" -configuration Release -arch arm64 -arch armv7 -arch armv7s only_active_arch=no defines_module=yes -sdk "iphoneos"
xcodebuild -target "${FRAMEWORK_NAME}" -configuration Release -arch x86_64 -arch i386 only_active_arch=no defines_module=yes -sdk "iphonesimulator"
# 5
# Remove .framework file if exists from previous run.
if [ -d "${OUTPUT_PATH}/${FRAMEWORK_NAME}.framework" ]; then
rm -rf "${OUTPUT_PATH}/${FRAMEWORK_NAME}.framework"
fi
# 6
# Copy the device version of framework.
cp -r "${SRCROOT}/build/Release-iphoneos/${FRAMEWORK_NAME}.framework" "${OUTPUT_PATH}/${FRAMEWORK_NAME}.framework"
# 7
# Replace the framework executable within the framework with
# a new version created by merging the device and simulator
# frameworks' executables with lipo.
lipo -create -output "${OUTPUT_PATH}/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphoneos/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}" "${SRCROOT}/build/Release-iphonesimulator/${FRAMEWORK_NAME}.framework/${FRAMEWORK_NAME}"
# 8
# Copy the Swift module mappings for the simulator into the
# framework. The device mappings already exist from step 6.
cp -r "${SRCROOT}/build/Release-iphonesimulator/${FRAMEWORK_NAME}.framework/Modules/${FRAMEWORK_NAME}.swiftmodule/" "${OUTPUT_PATH}/${FRAMEWORK_NAME}.framework/Modules/${FRAMEWORK_NAME}.swiftmodule"
# 9
# Delete the most recent build.
if [ -d "${SRCROOT}/build" ]; then
rm -rf "${SRCROOT}/build"
fi