« MBS Xojo Developer Co… | Home | New Timer for Windows… »

Code Signing FileMaker Runtimes


Everyone producing runtimes with FileMaker 13 for Mac OS X has a problem. You need to sign the app for Gate Keeper. If your runtime is not signed, the Finder will ask the user when launching the application after download to delete the app! To avoid users get confused or not use the runtime, we sign the runtime.

How?

Signing the runtime got harder with new requirements in Mac OS X 10.9 and the upcoming Yosemite release. We not just need to sign the actual application, but also make sure we sign all the components. For the frameworks inside the runtime, we need to fix them to give them a few standard symlinks which are missing. Without those modifications, the bundle will not sign. Luckily all the PPC code and duplicate libraries got removed in FileMaker 13.0v3, so we don't need to do this yourself like in FileMaker 12. If you like to save a few bytes, you can delete the icon files: FM12Dict.icns, FM12Label.icns and FM12Plug.icns inside the runtime. Those are not referenced and never used.

Developer Account

In order to sign, you need to sign up for a Mac Developer Account with Apple. This costs $99 per year. In the Certificates, Identifiers & Profiles section, please go in Mac Apps section and there in Certificates. Create a new Developer ID, follow the instructions and download the certificate file. Double click it to add it to Keychain Manager and voila, it is installed and ready to use.

Sign Script

The complete script is here for download as zip archive: signscript.zip

When you edit the script in a text editor (like BBEdit or TextWranger), you can change the path to the runtime, the name of the app and the name of the certificate. Please note that this script will not work without correct values. If your file name or path contain special character, escaping may be needed. For example a space character needs to be escaped with putting a backslash character just before the space character. You can learn how to escape a path by dragging and dropping the file or folder into the window of the Terminal application. The path is inserted and you can copy & paste it.

Now when everything is setup for your runtime in the script, you can drop the script on a Terminal window and press return key to start it. You'll see a couple of messages. This may include some complains from rm command trying to delete files which are not there. Nothing to worry about, the script just makes sure everything is correct. Further you see a couple of sign message for various parts of the application. The final line should show "signed bundle with Mach-O thin" and report success for signing your runtime app.

Verification

To check if app is okay for Gate Keeper you can first verify code signature using a call to codesign with a couple of v for more details and -d to display certificate:

codesign -d -vvvv /Users/cs/Desktop/Test/test.app

Next with spctl utility you can show if app is accepted. So we run spctl utility with verbose messages and -a parameter:

spctl -a -vv /Users/cs/Desktop/Test/test.app

Please change path to your runtimes before running above commands. The output should say "accepted" and now you are lucky and can archive and upload your runtime. Good luck!

proudly sponsored by INtex Publishing

PS: This does not work for FileMaker 12 runtimes.
22 08 14 - 10:26
four comments

Just an extra note. You need to do the code signing in Mac OS 10.9 (or higher) to meet the new requirements.
Code signing your projects in Mountain Lion will not work.
Koen Van Hulle (Email) (URL) - 22 08 14 - 16:51

Since FileMaker is owned by Apple and FileMaker sells Advanced as creating Runtimes to be freely distributed, shouldn’t this problem be resolved by FileMaker rather than the user? Or are you doing something out of the ordinary that a typical developer might not do?
Jack Rodgers (Email) (URL) - 22 08 14 - 19:35

Of course FileMaker could make it an option in building runtimes to select a certificate and automatically sign it. They could also make their bundles signable. And while FileMaker 12 didn’t run on PPC Macs, they still included in FM12 and early FM13 releases a lot of PPC code. See my older runtime shrinker app.
I bet they simply don’t care much for runtimes any more.
Christian Schmitz (URL) - 22 08 14 - 19:52

Its very nice of you guys to make a script like this but unfortunately i docent work, at least not in the configuration Mac OS X 10.10.3 and FMP13.9.
Issues that everything is ok until the two last lines which says:
Venturi – Journalen 12.0.app/Contents/MacOS/Runtime: unsealed contents present in the bundle root
Venturi – Journalen 12.0.app: unsealed contents present in the bundle root
Carsten Dyhr (Email) (URL) - 08 06 15 - 10:29


  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.