工具
Xcode 14.2
场景
打包frameWork
问题
accessing build database "/Users/xxxx/Library/Developer/Xcode/DerivedData/xxxxSDK-xxxxx/Build/Intermediates.noindex/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
分析
使用14版本之前的Xcode创建的老项目,在Lib打包脚本中没有build权限
解决
在tagers
中选择Lib
文件,然后在Build Phases
→Run Script
修改打包脚本
增加OBJROOT="${OBJROOT}/DependentBuilds" BUILD_ROOT="${BUILD_ROOT}"
可将下面部分代码复制替换到原有部分代码上
#build support native API
# Step 1. Build Device and Simulator versions
cd "${SRCROOT}/.."
xcodebuild build -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} ONLY_ACTIVE_ARCH=NO -configuration ${CONFIGURATION_RN} -sdk iphoneos BUILD_DIR="${BUILD_DIR}" OBJROOT="${OBJROOT}/DependentBuilds" BUILD_ROOT="${BUILD_ROOT}"
xcodebuild build -workspace ${PROJECT_NAME}.xcworkspace -scheme ${PROJECT_NAME} -configuration ${CONFIGURATION_RN} -sdk iphonesimulator VALID_ARCHS="i386 x86_64" BUILD_DIR="${BUILD_DIR}" OBJROOT="${OBJROOT}/DependentBuilds" BUILD_ROOT="${BUILD_ROOT}"
网友评论