I have a properly sandboxed application in macOS, Objective-C that talks to third party applications by Apple Events (e.g. Adobe InDesign).
In macOS Mojave everything breaks cause Apple's new SIP (https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/Introduction/Introduction.html) doesn't allow the communication.
I didn't find any solution yet. Any help appreciated.
This is the error message:
skipped scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" because it is not SIP-protected.
This is a pretty good summary of the problem: https://www.felix-schwarz.org/blog/2018/06/apple-event-sandboxing-in-macos-mojave
Apple still has to work on this, it's not perfect, it's not user friendly, it's not well documented. But here is a working solution.
Beginning from OSX 10.14 (Mojave) you have to ask OSX's System Integrity Protection (SIP) if the user allowed your application to communicate with others.
For making it to work you need to add an entry to your app's .plist file:
Note: You can not use more entries for more applications. Its one entry. So choose your description wisely. This description will be shown in Apple's dialog asking the user for acceptance.
If you have an XPC service like i do, place this in your MAIN app, not in the service.
Now in your application - before using Apple events - check for the current state (if AppleEvents allowed or not). I wrote this method:
call it like this:
You may find detailed information in AppleEvents.h - here's a copy for the used method :
Conclusion:
As mentioned before, it's not perfect.