2017-05-01 53 views
8

我想簽署我的應用程序以根據安全性擺脫應用程序阻止。我遵循官方NW.js文檔Mac-App-Store-(MAS)-Submission-Guideline生成的證書,打包我的應用程序,簽名。但簽署後,我的應用程序在發佈後立即關閉。當我試圖上傳此通過模板裝載機簽署應用的應用商店我:nw.js登錄應用程序OSX

enter image description here

我已經問上github問題,但沒有得到任何迴應呢。如果有人在mac os上有nw.js的經驗,請幫忙。

+2

您試圖用什麼代碼簽署您的應用程序?其他錯誤是不言自明的。 – Oskar

+0

@OskarI使用了這個python腳本。新增所有憑證,並且它已成功簽署應用程序,但應用程序在啓動後關閉....並且在應用商店中,它表示簽名無效。 http://docs.nwjs.io/en/latest/For%20Users/Advanced/Support%20for%20Mac%20App%20Store/ – Arti

+0

我不喜歡在教程的所有CONFIGS,選中此幾次 – Arti

回答

0

終於在這裏找到了答案: https://github.com/nwjs/nw.js/issues/6338

所以,簽上你的應用程序,你需要:

運行mas.py腳本之前固定偷跑內容:

# Set PATH_TO_YOUR_APP variable first 
VERSION_NUMBER=`ls "${PATH_TO_YOUR_APP}/Contents/Versions/"` 
NWJS_FRAMEWORK="$PATH_TO_YOUR_APP/Contents/Versions/$VERSION_NUMBER/nwjs Framework.framework" 
LIBNODE_DYLIB="libnode.dylib" 
LIBNODE_LINK_TO="Versions/A/$LIBNODE_DYLIB" 

echo fixing nwjs Framework unsealed content 
pushd "$NWJS_FRAMEWORK" 
mv "$LIBNODE_DYLIB" "$LIBNODE_LINK_TO" 
ln -s "$LIBNODE_LINK_TO" 
popd 

所有的細節,你會在此發現螺紋:https://github.com/nwjs/nw.js/issues/6338

希望nw團隊將修復此問題

0

可以協同設計的應用程序,而無需使用Xcode的。下面的bash腳本允許你這樣做。你需要你開發者ID應用程序,你可以在你的鑰匙串訪問應用程序中找到。

你必須改變版本,你有,這取決於nw.js的版本的目錄後,該目錄正在使用

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"