title: How to make Apple Assessment Mode work on Mac app built with Electron?
body: <ul>
  <li><p><strong>Electron-Builder Version</strong>: 22.8.1</p>
  </li>
  <li><p><strong>Node Version</strong>: 12.16.3</p>
  </li>
  <li><p><strong>Electron Version</strong>: 10.1.3</p>
  </li>
  <li><p><strong>Electron-Updater Version</strong>: 4.3.5</p>
  </li>
  <li><p><strong>Target</strong>: mac, dmg</p>
  </li>
  </ul>
  <p>Hi! I need to be able to run my Mac app in Assessment Mode. But even though I use a provisioning profile with the Assessment Mode capability enabled, the moment I add the <code>com.apple.developer.automatic-assessment-configuration</code> entitlement to my entitlements.mac.plist file, the app cannot be launched anymore and I get this error:</p>
  <blockquote>
  <p>The application cannot be opened for an unexpected reason, error=Error
  Domain=NSOSStatusErrorDomain Code=-10826 &quot;kLSNoLaunchPermissionErr:
  User doesn't have permission to launch the app (managed networks)&quot;
  UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2508,
  NSUnderlyingError=0x137622890 {Error Domain=RBSRequestErrorDomain
  Code=5 &quot;Launch failed.&quot; UserInfo={NSLocalizedFailureReason=Launch
  failed., NSUnderlyingError=0x13761c7d0 {Error
  Domain=NSPOSIXErrorDomain Code=153 &quot;Unknown error: 153&quot;
  UserInfo={NSLocalizedDescription=Launchd job spawn failed with error:
  153}}}}}</p>
  </blockquote>
  <p><a href="https://i.stack.imgur.com/vWwzY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/vWwzY.png" alt="Permission erorr popup" /></a></p>
  <p>I was able to reproduce the issue even using the boilerplate from <a href="https://github.com/electron-react-boilerplate/electron-react-boilerplate" rel="nofollow noreferrer">https://github.com/electron-react-boilerplate/electron-react-boilerplate</a></p>
  <p>The steps I done are:</p>
  <ol>
  <li><p>added these entitlements to my entitlements.mac.plist file (as described <a href="https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_automatic-assessment-configuration?language=objc" rel="nofollow noreferrer">here</a>):</p>
  <pre><code>&lt;key&gt;com.apple.developer.automatic-assessment-configuration&lt;/key&gt;
  &lt;true/&gt;
  &lt;key&gt;com.apple.security.temporary-exception.mach-lookup.global-name&lt;/key&gt;
  &lt;array&gt;
      &lt;string&gt;com.apple.assessmentagent&lt;/string&gt;
  &lt;/array&gt;
  </code></pre>
  </li>
  <li><p>enabled the following Additional Capabilities for my app ID in Identifiers at developer.apple.com</p>
  </li>
  </ol>
  <ul>
  <li>Automatic Assessment Configuration</li>
  </ul>
  <ol start="3">
  <li>enabled the following Entitlements for my Developer ID Application Provisioning Profile linked to my app ID and Developer ID Application certificate at developer.apple.com</li>
  </ol>
  <ul>
  <li>macOS Automatic Assessment Configuration (Developer ID)</li>
  </ul>
  <p>After building the app, I cannot start it and get the errors mentioned above. Removing the <code>com.apple.developer.automatic-assessment-configuration</code> entitlement, makes the app launch as normal. I've been trying to solve this for a while now, but nothing has worked so far. Could you please help me figure out what might be the issue here? Thank you!</p>