Problem is solved. Xcode is looking for an non-existent symlink. There is no "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk". Instead, there is
drwxr-xr-x 8 maurice staff 256 May 28 00:43 MacOSX.sdk
lrwxr-xr-x 1 maurice staff 10 May 28 00:16 MacOSX13.3.sdk -> MacOSX.sdk
lrwxr-xr-x 1 maurice staff 10 May 28 00:16 MacOSX13.sdk -> MacOSX.sdk
When I manually added the symlink
lrwxr-xr-x 1 maurice staff 10 May 28 00:44 MacOSX13.0.sdk -> MacOSX.sdk
Everything started working again.
I tried it two ways,
let documentsURL = try fileManager.url(for: .downloadsDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
// and
let path = NSSearchPathForDirectoriesInDomains(.downloadsDirectory, .userDomainMask, true)[0] as String
let documentsURL = URL(fileURLWithPath: path)
Problem is solved. Xcode is looking for an non-existent symlink. There is no "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk". Instead, there is
drwxr-xr-x 8 maurice staff 256 May 28 00:43 MacOSX.sdk
lrwxr-xr-x 1 maurice staff 10 May 28 00:16 MacOSX13.3.sdk -> MacOSX.sdk
lrwxr-xr-x 1 maurice staff 10 May 28 00:16 MacOSX13.sdk -> MacOSX.sdk
When I manually added the symlink
lrwxr-xr-x 1 maurice staff 10 May 28 00:44 MacOSX13.0.sdk -> MacOSX.sdk
Everything started working again.
I tried it two ways,
let documentsURL = try fileManager.url(for: .downloadsDirectory, in: .userDomainMask, appropriateFor: nil, create: false)
// and
let path = NSSearchPathForDirectoriesInDomains(.downloadsDirectory, .userDomainMask, true)[0] as String
let documentsURL = URL(fileURLWithPath: path)