• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScript in Sandboxed App
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: AppleScript in Sandboxed App
      • From: Fritz Anderson <email@hidden>
    • Re: AppleScript in Sandboxed App
      • From: Mike Abdullah <email@hidden>
  • Prev by Date: Re: How to get registered dragged types from NSWindow?
  • Next by Date: Re: AppleScript in Sandboxed App
  • Previous by thread: Re: How to get registered dragged types from NSWindow?
  • Next by thread: Re: AppleScript in Sandboxed App
  • Index(es):
    • Date
    • Thread