Macos 无法在沙盒环境中运行Electron Helper

Macos 无法在沙盒环境中运行Electron Helper,macos,electron,helper,codesign,appstore-sandbox,Macos,Electron,Helper,Codesign,Appstore Sandbox,我在向苹果商店提交电子应用程序时遇到问题 ERROR ITMS-90296: "App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.smarterback.desktop.pkg/P

我在向苹果商店提交电子应用程序时遇到问题

ERROR ITMS-90296: "App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list: [( "com.smarterback.desktop.pkg/Payload/SmarterBack.app/Contents/Frameworks/SmarterBack Helper EH.app/Contents/MacOS/SmarterBack Helper EH", "com.smarterback.desktop.pkg/Payload/SmarterBack.app/Contents/Frameworks/SmarterBack Helper NP.app/Contents/MacOS/SmarterBack Helper NP", "com.smarterback.desktop.pkg/Payload/SmarterBack.app/Contents/Frameworks/SmarterBack Helper.app/Contents/MacOS/SmarterBack Helper", "com.smarterback.desktop.pkg/Payload/SmarterBack.app/Contents/MacOS/SmarterBack" )] Refer to App Sandbox page at https://developer.apple.com/devcenter/mac/app-sandbox/ for more information on sandboxing your app."
所以我更改了我的.plist文件以启用沙盒,提交时一切都很顺利,但该修复程序存在另一个问题,现在我的应用程序不想启动,因为它找不到“SmarterBack Helper”

[8801:0907/140725.080936:FATAL:atom_main_delegate_mac.mm(50)] Unable to find helper app
0   Electron Framework                  0x000000010c4fdde3 _ZN9brightray12MainDelegate24OverrideChildProcessPathEv + 836531
1   Electron Framework                  0x000000010c4d3297 _ZN9brightray12MainDelegate24OverrideChildProcessPathEv + 661607
2   Electron Framework                  0x000000010c2c2169 _ZN4atom16AtomMainDelegate24OverrideChildProcessPathEv + 377
3   Electron Framework                  0x000000010c4314fb _ZN9brightray12MainDelegate20BasicStartupCompleteEPi + 107
4   Electron Framework                  0x000000010c2c17ed _ZN4atom16AtomMainDelegate20BasicStartupCompleteEPi + 237
5   Electron Framework                  0x000000010c6a7311 _ZN9brightray12MainDelegate24OverrideChildProcessPathEv + 2578657
6   Electron Framework                  0x000000010c6a6bde _ZN9brightray12MainDelegate24OverrideChildProcessPathEv + 2576814
7   Electron Framework                  0x000000010c2be747 AtomMain + 71
8   SmarterBack Helper                  0x000000010c2b6f26 main + 38
9   libdyld.dylib                       0x00007fff9a371235 start + 1
10  ???                                 0x0000000000000010 0x0 + 16
这是我的孩子。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.inherit</key>
    <true/>
    <key>com.apple.security.temporary-exception.files.absolute-path.read-write</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.inherit</key>
    <true/>
    <key>com.apple.security.app-sandbox</key>
    <true/>
    <key>com.apple.security.application-groups</key>
    <string>com.smarterback.desktop</string>
  </dict>
</plist>
据我所知,我必须对所有文件进行签名并启用沙盒,但当我启动应用程序时,我会看到一个没有任何内容的白色框,因为应用程序无法找到帮助程序。以前有人有过这个问题吗

#!/bin/bash

# Name of your app.
APP="SmarterBack"
# The path of your app to sign.
APP_PATH="release-builds/SmarterBack-mas-x64/SmarterBack.app"
# The path to the location you want to put the signed package.
RESULT_PATH="/Users/katerina/Desktop/$APP.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: JENGO LLC (63UV74H5Q5)"
INSTALLER_KEY="3rd Party Mac Developer Installer: JENGO LLC (63UV74H5Q5)"
# The path of your plist files.
CHILD_PLIST="child.plist"
PARENT_PLIST="parent.plist"

FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"

sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libnode.dylib"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"

sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/Contents/MacOS/$APP Helper EH"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper EH.app/"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/Contents/MacOS/$APP Helper NP"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper NP.app/"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
sudo codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/Info.plist"
sudo codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"

codesign --verify --deep --display --verbose=4 "$APP_PATH"

sudo productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"