Separate names with a comma.
Discussion in 'Mac Programming' started by nelly22, Oct 7, 2018.
Why i get this dialog every time i launch my AppleScript app? Should it happen only once?
AppleScript application properties and global variables are saved within a script file, so each time the application is run it gets modified, which makes it a different application as far as the system is concerned. The application should be code-signed, embedded script files can be made read-only, or the script application can be created in Xcode to prevent it from being modified when run (note that properties will not persist, so different methods will need to be used to save items between runs).
So there is two ways to do it, code-sign app, embedded script files made read only or create script app in Xcode.
I'm newbie. Is there any guide how to do these things?
I installed Xcode and it has tons of confusing stuff like General, Capabilities, Resource Tags, Info, Build Settings, Build Phases, Build Rules, etc.
Well, Xcode is a beast no matter how you look at it, so it depends on how serious you are wanting to get. The easiest way, especially if you are just using it yourself, would be to just go to the script inside the application bundle and use the Get Info panel to change its permissions to read-only.
If you are wanting to use Xcode, go to Preferences > Accounts, log in with your Apple ID, select your Team (Personal Team), then add a new certificate with Manage Certificates. After making a certificate, you can set the Signing Certificate (for whatever build) in the General tab to Mac Developer. Beware if you are using Xcode 10 in Mojave, as there are a lot of extra entitlements and permissions gotchas.
If you have Xcode installed, there is also the codesign shell utility, which you can use with a self-signed certificate you create with the Keychain Access utility.
Piece of cake (?!)