How to get Sketch.app's absolute path? App is the one which current plugin works in.
var appPath = NSBundle.mainBundle().bundlePath();
turbobabr That works!
Another way: NSWorkspace.sharedWorkspace().activeApplication()
I have a question.
How to get sketch file path?? Not the "sketch. app" path.
MrPeak Keep in mind activeApplication() is deprecated, and can return other applications besides Sketch.
wave Do you mean you are after the file path of the currently open Sketch file?
If so use: context.document.fileURL() – which is of type NSURL.
Thanks a lot.
I'm solve this question.
But I have a new question.
how do you get the edit status of the sketch file?