Skip to content

Instantly share code, notes, and snippets.

@macecchi
Last active March 5, 2016 04:28
Show Gist options
  • Save macecchi/3a7128fdf4df08149a03 to your computer and use it in GitHub Desktop.
Save macecchi/3a7128fdf4df08149a03 to your computer and use it in GitHub Desktop.
Signs an app generated using nw-builder.js for distribution outside the Mac App Store
app="$1"
identity="" # SHA1 Hash of your Developer ID certificate
echo "### signing frameworks"
codesign --force --verify --verbose --sign "$identity" "$app/Contents/Frameworks/nwjs Framework.framework/nwjs Framework"
codesign --force --verify --verbose --sign "$identity" "$app/Contents/Frameworks/nwjs Helper EH.app/"
codesign --force --verify --verbose --sign "$identity" "$app/Contents/Frameworks/nwjs Helper NP.app/"
codesign --force --verify --verbose --sign "$identity" "$app/Contents/Frameworks/nwjs Helper.app/"
codesign --force --verify --verbose --sign "$identity" "$app/Contents/Frameworks/crash_inspector"
echo "### signing app"
codesign --force --verify --verbose --sign "$identity" "$app"
echo "### verifying signature"
codesign -vvv -d "$app"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment