I'm having problem with the infamous:
"/Users/n/Library/Developer/Xcode/DerivedData/Build/Intermediates/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location
How do I fix broken "modern" build system getting stuck with a locked database?
I tried:
Now I'm with a fresh Xcode installation, the project worked for a dozen builds(real device and simulator) and the problem comes back, making me unable to work on a project. How I can reset the locks on build.db or delete it?
I see this question asked multiple times, and the answers do not solve my problem. I'm not using build scripts, all I have is a couple cocoapods. Please do not close this question, as I'm asking specifically about lack of:
The only thing that lets me continue working is turning to the legacy build system:


How can I use the legacy build system with Xcode 10's `xcodebuild`?
Xcode 10: unable to attach DB error
I encountered this when tinkering with cli, swift run democli. The error I got was:
unable to attach DB: error: accessing build database "/Users/xman/Desktop/democli/.build/x86_64-apple-macosx/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location.
I just remove the build.db, and the DB error is gone.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With