iOS xcode14 database is locked Possibly there are two concurrent builds running in the same file...

工具

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 PhasesRun 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}"
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容