`NSWorkspace.open` cannot deal with `xcodeproj`

Hello.

I could wrong, but it seems NSWorkspace.open cannot open xcodeproj.

When I try to do so in my sandboxed App, the App would hang the thread, causing NSWorkspace.open not responsive in the following calls. If called on the @main thread, then bad luck, it would cause dead lock.

Callings this function on a normal file, such as .txt, or in a Command line Tool works perfectly. Is there anything obvious that I missed?

I have permissions to read/write the files, as indicated by url.resourceValues(forKeys: [.isWritableKey]).isWritable.

ChatGPT found a way to deal with this using deprecated symbols:

try NSWorkspace.shared.open([path.url], withAppBundleIdentifier: "com.apple.dt.Xcode", options: .default, additionalEventParamDescriptor: nil, launchIdentifiers: nil)

I suppose there is something wrong with the latest APIs.

`NSWorkspace.open` cannot deal with `xcodeproj`
 
 
Q