Electron app shows blank screen in Apple review

378 Views Asked by At

My electron application is getting rejected from Apple review as it display a blank white screen on launch while review. Whereas my .app file is working fine when launched locally before signing. I think there must be something wrong with signing the application. In main.js I have declared sandbox: true as well.

    mainWindow = new BrowserWindow({
    show: false, icon: icon,
    autoHideMenuBar: true,
    webPreferences: {
      nativeWindowOpen: true,
      nodeIntegration: true,
      sandbox:true
    }
  });

My entitlements file is as follows:

<?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.application-groups</key>
    <string>xxxx</string>
    <key>com.apple.security.files.user-selected.read-only</key>
    <true/>
    <key>com.apple.security.files.user-selected.read-write</key>
    <true/>
    <key>com.apple.security.network.client</key>
    <true/>
    <key>com.apple.security.device.audio-input</key>
    <true/>
    <key>com.apple.security.personal-information.location</key>
    <true/>
    <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    <true/>
</dict>
</plist>

Command to sign the app:

 electron-osx-sign MyApp-mas-x64/MyApp.app --provisioning-profile=myapp.provisionprofile --entitlements=public/entitlements.mas.plist

Is there any way I can test the .pkg file or test it before submitting to store? If there is any issue while signing the application then please correct.

0

There are 0 best solutions below