In case your planning to distribute a Sandboxed App, the only way of running a script and interacting with other apps on the user's system is to run a script file from the Application Script folder. I have played around quite a bit with this manner and after having numerous discussions and trial & errors on that subject, I want to present 2 solutions (until now it seems that these are the only possible solutions for a sandboxed application).įirst of all, if you don't consider to distribute your app on the App Store, you can forget about the following, since you just have to deactivate the Sandbox and you are basically free to do whatever you want! I kind of get Apple's idea not to let applications do whatever they want without the user's consent.Īnyway, unfortunately this article describes the solution using Objective C and this is something I have even less of a clue than SwiftUI.Ĭan anybody tell me how to run (or copy my script.scpt file to the accessible library folder and the run) a script from within a SwitUI View? This would be so much help! Apparently this error is because the app is running in a sandbox and within the sandbox Mail is indeed not running. Set newSig to make new signature with properties " Īfter some research i found this article which describes the problem quite well. The script itself is pretty simple: // Generates a signature in Mac Mail Basically I want to run an AppleScript from inside my app which creates a signature in Mac Mail. I'm kind of getting some more understanding with basic SwiftUI but now I wanted to extend my application to actually do some stuff regarding system components for me.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |