Thursday 6 March 2014

Apple: Sign My Scripts — Simpler Code-Signing

Sign My Scripts — Simpler Code-Signing
-- Free utility for those distributing AppleScript files --

Sign My Scripts.app simplifies code-signing script applications. If you distribute script applications by email or the Web, users running Mountain Lion with the default setting for Gatekeeper will not have to use the control-click workaround to open them if they are properly code-signed.

Code-signing requires a valid Apple developer ID, which you can only get by joining Apple's paid developer program. The certificate for the ID needs to be installed in the keychain of the Mac on which you plan to code-sign your script apps.

To maintain their integrity, the code in code-signed scripts cannot be altered, which means they behave differently to normal scripts in that properties do not persist between launches — the script files cannot be written back to disk with the new values.

To use Sign My Scripts, drag a script app over its icon. If the app has no bundle identifier, you will be asked to provide one. Script apps have traditionally not included a bundle identifier, but AppleScript Editor in Mac OS X 10.8 is now providing one for all saved apps. (See below for what a bundle identifier entails.)

You will also be asked to enter the name used in your developer ID. You just need to enter the name used — the app will preceed it with "Developer ID Application: " automatically.

You will then get a normal authorization dialog, where you need to enter an adminsitrator's name and password to complete the process. Any .scpt and scptd files in the app will have their write privileges removed as part of the process.

Sign My Scripts is free, and the code is fully accessible. It is a standard AppleScript app itself, using System Events, the Finder and do shell script. You can modify it for your own use, but to do so you will need to save it as a new application because it is code-signed. It works only under Mac OS X 10.8.

Sign My Scripts may fail if you have not installed Xcode and its command-line tools on your Mac.

<< Bundle Identifier >>
From Apple's description of the bundle identifier (CFBundleIdentifier): Each distinct app or bundle on the system must have a unique bundle ID. The system uses this string to identify your app in many ways. [...] The bundle ID string must be a uniform type identifier (UTI) that contains only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.) characters. The string should also be in reverse-DNS format. For example, if your company’s domain is Ajax.com and you create an app named Hello, you could assign the string com.Ajax.Hello as your app's bundle identifier. Note: Although formatted similarly to a UTI, the character set for a bundle identifier is more restrictive.

Click HERE to download Sign My Scripts.app 1.0.3.


Reference:
Sign My Scripts — Simpler code-signing
http://www.macosxautomation.com/applescript/apps/readmyscripts.html

No comments:

Post a Comment