我想根据安全性签署我的应用程序以摆脱应用程序阻止。我按照官方NW.js
文档Mac-App-Store-(MAS)-Submission-Guideline生成的证书,打包我的应用程序,签名。但签名后,我的应用程序在发布后立即关闭。当我尝试通过模板加载器将这个已签名的应用程序上传到应用程序商店时,我得到了:
我已在github上提问,但尚未得到任何回复。如果有人在mac os上有nw.js的经验,请帮助。
答案 0 :(得分: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"
答案 1 :(得分:0)
终于找到了答案: https://github.com/nwjs/nw.js/issues/6338
因此,要签署您的应用,您需要:
关注MAS指南 http://docs.nwjs.io/en/latest/For%20Users/Advanced/Support%20for%20Mac%20App%20Store/
在entitlements.plist
Sandbox=Yes
在运行mas.py脚本以修复Unleashed内容之前:
# 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团队能解决这个问题