Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nw.js sign application OSX

I want to sign my app to get rid of app blocking with according to security. I followed to the official NW.js documentation Mac-App-Store-(MAS)-Submission-Guideline Generated certificates, packaged my app, sign it. But after signed, my app close immediately after launch. When I tried to upload this signed app via template loader to app store I got:

enter image description here

I already asked question on github, but didn't get any response yet. If someone had experience with nw.js on mac os please help.

like image 721
Arti Avatar asked May 01 '17 14:05

Arti


1 Answers

You can codesign the app without using xcode. The following bash script allows you to do that. You need you developer id Application which you can find in your keychain access app.

You have to change the directory after versions to the directory that you have, depending on the version of nw.js that you are using

identity="Developer ID Application: youridentiy... (some number)"
app="pathToYourApp.app"
rm -f "$app/Icon^M" 
rm -r -f "$app/.idea"


echo "### signing libraries"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/Libraries/exif.so"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/libffmpeg.dylib"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/libnode.dylib"

echo "### signing frameworks"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/nwjs Framework"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/Helpers/crashpad_handler"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Helper.app/Contents/MacOS/nwjs Helper"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Helper.app/"
codesign --force --verify --sign "$identity" "$app/Contents/Versions/60.0.3112.113/nwjs Framework.framework/helpers/crashpad_handler"

echo "### sing osx folder"
codesign --force --verify --sign "$identity"  "$app/Contents/MacOS/nwjs"

echo "### signing app"
codesign --force --verify --sign "$identity" "$app"

echo "### verifying signature"
codesign -vv -d "$app"
like image 119
Silve2611 Avatar answered Oct 23 '22 18:10

Silve2611