Re: NSApplicationScriptsDirectory access for helper tool

2012-12-02 Thread jonat...@mugginsoft.com

On 30 Nov 2012, at 15:00, jonat...@mugginsoft.com wrote:

 I think that this question can be distilled down to :
 
 Can a sandboxed app bundle helper tool use NSUserUnixTask to run a user 
 script in NSApplicationScriptsDirectory?
 
 All my attempts have failed.
 
 Regards
 
 Jonathan Mitchell
 
To update this.

I was attempting to launch a user script from NSApplicationScriptsDirectory 
using a bundle helper tool and failed as the operation was not permitted.

I then ran the helper in the main app executable on a separate thread and the 
same code launched the user script without issue.

If anyone succeeds in launching a user script from 
NSApplicationScriptsDirectory via a helper tool then it would be good to know.

Jonathan
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSApplicationScriptsDirectory access for helper tool

2012-11-30 Thread jonat...@mugginsoft.com
I think that this question can be distilled down to :

Can a sandboxed app bundle helper tool use NSUserUnixTask to run a user script 
in NSApplicationScriptsDirectory?

All my attempts have failed.

Regards

Jonathan Mitchell

On 30 Nov 2012, at 13:50, jonat...@mugginsoft.com wrote:

 In a sandboxed app I do the following for say com.mystuff.app and a folder 
 named com.mystuff.app is created in NSApplicationScriptsDirectory as expected.
 
 NSError *error = nil;
   NSURL *scriptsFolderURL = [[NSFileManager defaultManager]
  URLForDirectory:NSApplicationScriptsDirectory
  inDomain:NSUserDomainMask
  appropriateForURL:nil
  create:YES
  error:error];
   MLogInfo(@NSApplicationScriptsDirectory = %@, scriptsFolderURL);
 
 Now I also have a helper app identified as com.mystuff.app-helper.
 Trying to access url for the NSApplicationScriptsDirectory from within the 
 helper yields an error saying that I don't have permission to save 
 com.mystuff.app-helper into NSApplicationScriptsDirectory.
 
 Is this as expected and is there a workaround?
 
 Jonathan
 
 
 
 
 
 
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com
 
 This email sent to jonat...@mugginsoft.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com