AppleScript in Sandboxed App
AppleScript in Sandboxed App
- Subject: AppleScript in Sandboxed App
- From: John Nairn <email@hidden>
- Date: Mon, 14 Jan 2013 09:50:01 -0800
I have sandboxed an app that allows users to run scripts as a major feeature (i.e., dealbreaker on sandboxing only answer is to delete this feature). I was pleased that I can run AppleScripts fine through the sandboxed app from Apple's Script Editor, but the user experience is much (much, much) better if they can select a script from a menu in my app and run it, but that method fails. Here is more info:
1. Script running code is sound and works fine if app is not sandboxed.
2. Script is compiled, error free, and does not try to send events to any app except my own
3. Script is stored in application support of my container and therefore I should have read and write permission on that file
4. The first step in running the script (which is when is fails) is simply:
script = [[NSAppleScript alloc] initWithContentsOfURL:[NSURL fileURLWithPath:scriptPath] error:&errorInfo];
The errorInfo dictionary has only NSAppleScriptErrorNumber = -43 and no other details. I could not find this error number in a google search.
5. I have more problems running python scripts using Scripting bridge when sandboxed, but I am working on one problem for now
------------
John Nairn
http://www.geditcom.com
Genealogy Software for the Mac
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden