SourceKitten icon indicating copy to clipboard operation
SourceKitten copied to clipboard

Is it possible to use SourceKitten in a sandboxed app?

Open Moriquendi opened this issue 5 years ago • 2 comments

Hi folks, As SourceKitten is using SourceKit, is it possible to create the app that is sandboxed and can still use SourceKitten? I mean the app that can be distributed through the Mac App Store.

Is there any special entitlement that could be set to allow the app interacting with the SourceKit? Or maybe could it be enabled by the user (eg granting access to some directory through NSPanel)?

Moriquendi avatar Feb 09 '20 16:02 Moriquendi

SourceKitten uses dyld to load libClang and libSourceKitdInProc at runtime, which I believe isn't allowed for sandboxed apps on macOS. I'm not an expert on macOS sandbox limitations though, so please let me know if you find more information.

jpsim avatar Mar 01 '20 22:03 jpsim

From what I've learnt, you're right - I haven't found any workaround for that.

Moriquendi avatar Mar 04 '20 22:03 Moriquendi