jpsim / SourceKitten

An adorable little framework and command line tool for interacting with SourceKit.
MIT License
2.3k stars 226 forks source link

Is it possible to use SourceKitten in a sandboxed app? #645

Open Moriquendi opened 4 years ago

Moriquendi commented 4 years ago

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)?

jpsim commented 4 years ago

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.

Moriquendi commented 4 years ago

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