OS X code signing to prevent Gatekeeper of blocking the app

86 views
Skip to first unread message

daanp

unread,
Jan 16, 2013, 5:35:20 AM1/16/13
to node-...@googlegroups.com
Hi, i made an app using node-webkit now i want to distribute it for OS X, but apparently you need to sign your app so that Gatekeeper doesn't block this. Has anyone had any experience with this? I tried reading the documentation on the Apple site but i find it very difficult to understand.

kind regards,
Daan

daanp

unread,
Jan 16, 2013, 5:48:45 AM1/16/13
to node-...@googlegroups.com
I understand what code signing is and why it's useful ... but i don't understand how should i sign a node-webkit application ... the documentation is quiet easy when you use Xcode but when using an application which isn't made with Xcode like node-webkit it very vague.

Rob Righter

unread,
Feb 1, 2013, 3:01:33 PM2/1/13
to node-...@googlegroups.com
Your right, Apple's docs on this are very XCode centric which doesn't really help for node-webkit. Luckily its actually pretty easy to do. Here are the steps:

(1) Obtain and Install your Developer ID certificate (this is the part that is well documented by apple):

(2) Make sure you have XCode and XCode developer tools installed

(3) From the Terminal run:
security find-identity
This will return something like:
Policy: X.509 Basic
  Matching identities
  1) SOME_REALLY_LONG_HASH "Developer ID Application: Your Name"
     1 identities found

  Valid identities only
  1) SOME_REALLY_LONG_HASH "Developer ID Application: Your Name"
     1 valid identities found

(4) Copy the really long hash into the following Terminal command as follows:
codesign -s SOME_REALLY_LONG_HASH  /path/to/your/application.app

(5) Verify that it worked:
codesign --display --verbose /path/to/your/application.app

This should give you back the app details. You may notice that the identifier is com.intel.nw, if that is the case update your Info.plist file with the desired info, rebuild the app and resign it.





Xavier Vergés

unread,
Feb 3, 2013, 5:11:35 AM2/3/13
to node-...@googlegroups.com
Thanks for the info.

However, it is disappointing to learn that an OS X environment is needed to package apps for Mac. In my opinion, one great thing about node-webkit is  its ability to be able to let a developer build apps from three operating systems from a single development environment; now it looks like this machine needs to be Mac (or that you at least have a Mac available to ssh into it to do the code signing http://stackoverflow.com/a/12156576/239408 )

-Xavier
Reply all
Reply to author
Forward
0 new messages