为MacOS配对NW.js应用程序的麻烦

时间:2018-02-01 11:20:10

标签: code-signing nw.js

NWJS版本:0.28.0

操作系统:MacOS 10.13.3

以下是我用于编码的bash脚本片段:

export IDENTITY=YFXXXXXXXX
export PARENT_PLIST=./certs/parent.plist
export CHILD_PLIST=./certs/child.plist

codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Helper.app
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Framework.framework/Versions/A/Resources/app_mode_loader.app
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Framework.framework/Versions/A/XPCServices/AlertNotificationService.xpc
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Framework.framework/Versions/A/Helpers/crashpad_handler
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Framework.framework/Versions/A/nwjs\ Framework
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/nwjs\ Framework.framework/libnode.dylib
codesign --deep -s $IDENTITY --entitlements $CHILD_PLIST $helpersPath/libffmpeg.dylib
codesign --deep -s $IDENTITY --entitlements $PARENT_PLIST $APP_PATH

chmod -R 777 $APP_PATH

cd $APP_DIR && productbuild --component "$APP_NAME.app" /Applications --sign $IDENTITY "$APP_NAME.pkg"

我签署了Application Loader和ITunesConnect要求的所有内容。我在上传软件包之前遇到了很多问题。这一切都通过协调一切来解决。现在可以上传包。但是,我无法在编码后运行.app。在编码之前它运作良好。

这里还有孩子和父母的钳子。 子:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.inherit</key>
    <true/>
</dict>
</plist>

父:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.security.app-sandbox</key>
    <true/>
        <key>com.apple.security.network.client</key>
        <true/>
</dict>
</plist>

修改

还从system.log中提取:

Feb 6 12:10:43 MacBook-Air-Mac com.apple.xpc.launchd[1] (com.apple.xpc.launchd.domain.pid.nwjs Helper.779): Path not allowed in target domain: type = pid, path = /Users/mac/Desktop/lal/Trader.app/Contents/Versions/64.0.3282.119/nwjs Framework.framework/Versions/A/XPCServices/AlertNotificationService.xpc error = 147: The specified service did not ship in the requestor's bundle, origin = /Users/mac/Desktop/lal/Trader.app/Contents/Versions/64.0.3282.119/nwjs Helper.app

0 个答案:

没有答案