On 27 Jun 2016, at 08:21, Stephen Cronin < email@hidden> wrote:
In any case, is there any documentation of any kind showing guidance on how to use these new capabilities and still pass muster as Mac App Store App?
My info may be a bit out of date, but last I looked at this there was a whole load of stuff about adding temporary exceptions to your entitlements. To be honest, I found it completely off-putting, but YMMV.
You can have a look at
for a walk through.
Then there’s some new api’s like NUserAppleScriptTask. Here’s what the intro to the docs says:
The NSUserAppleScriptTask class is intended to run AppleScript scripts from your application. It is intended to execute user-supplied scripts and will execute them outside of the application's sandbox, if any.
The class is not intended to execute scripts built into an application; for that, use one of the NSTask classes. If the application is sandboxed, then the script must be in the NSApplicationScriptsDirectory folder. A sandboxed application may read from, but not write to, this folder.
If you simply need to execute scripts without regard to input or output, use NSUserScriptTask, which can execute any of the specific types. If you need specific control over the input to or output from the script, use this class.
However, I’m pretty certain that NSTasks that try to run osascript will hit sandboxing issues as soon as you try to communicate with any other process, so again, I’m not sure what you’re supposed to do there, other than referring back to the temporary entitlements thing.
I’m sure there are plenty that have figured it out (maybe more luck on Cocoa-Dev list), but it looks so flakey and obscure to me I rather just try to avoid using AppleScript at all if I’m trying to get into the App Store or distribute outside of it if I can’t.
Best
Phil
|