Syncing with Swift Package Manager in AppCode fails: attempt to write a readonly database

425 Views Asked by At

With AppCode 2020.3, "syncing" my XCode projects fails. I only got the following error message, which says "attempt to write a readonly database":

Package manifest execution failed with exit code 1:
/Users/username/Library/Caches/JetBrains/AppCode2020.3/DerivedData/APPNAME-dipqgziskjyufxhbqzlvojhifwse/SourcePackages/checkouts/Leanplum-iOS-SDK: error: error: accessing build database "/Users/username/Library/Caches/JetBrains/AppCode2020.3/DerivedData/APPNAME-dipqgziskjyufxhbqzlvojhifwse/SourcePackages/checkouts/Leanplum-iOS-SDK/.build/manifest.db": attempt to write a readonly database
1

There are 1 best solutions below

0
Ben Butterworth On

I was able to fix this by changing enabling adding write permissions:

chmod 774 /Users/username/Library/Caches/JetBrains/AppCode2020.3/DerivedData/APPNAME-dipqgziskjyufxhbqzlvojhifwse/SourcePackages/checkouts/Leanplum-iOS-SDK/.build/manifest.db

More details: I needed to add permissions to the users in the files "group" (staff).

I have posted this as a bug report on youtrack, as this does not happen in XCode.