Search Unity

Enable "hardened runtime" when building via Unity Cloud Build

Discussion in 'macOS' started by jtiret, May 18, 2021.

  1. jtiret

    jtiret

    Joined:
    Nov 11, 2020
    Posts:
    63
    Hello,

    In order to distribute the app outside of the Mac App Store, the app needs to go through the "Notarization Process". To pass this process successfully, the app needs to have the "Hardened Runtime" option enabled.

    Locally, I can do that by having Unity building the Xcode Project, and then enable manually "Hardened Runtime" in the Xcode project.

    However, when building from Unity Cloud Build, I don't have the option to enable "Hardened Runtime", but I have the option to do the notarization process, which always fails because "Hardened Runtime" isn't enabled.

    I thought I could find an option to enable "Hardened Runtime" in the Unity's Player Settings or in Unity Cloud Build, but there is none.

    By the way, I did include an entitlement file in Unity Cloud Build that contains the following lines but it doesn't change anything:
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    3. <plist version="1.0">
    4. <dict>
    5.  
    6.     <key>com.apple.security.cs.allow-unsigned-executable-memory</key>
    7.     <true/>
    8.  
    9.     <key>com.apple.security.cs.disable-library-validation</key>
    10.     <true/>
    11.  
    12.     <key>com.apple.security.cs.allow-dyld-environment-variables</key>
    13.     <true/>
    14.  
    15. </dict>
    16. </plist>
    17.  
    Did I miss something?

    Thanks in advance for your help