Search Unity

Need some help with codesigning for Mac App Store

Discussion in 'macOS' started by mudloop, May 20, 2021.

  1. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    Hi,

    I'm trying to prepare a build for the Mac App Store.

    Here's what I'm doing right now :

    My project has FMOD, and because every bundle needs to have its own bundle ID, I modify the info.plist files in the fmod bundles to be unique. I also edited the main info.plist to have the required LSApplicationCategoryType, CFBundleSignature and CFBundleSupportedPlatforms keys.

    chmod -R a+xr "APPPATH"

    codesign --remove-signature "APPPATH/Contents/PlugIns/resonanceaudio.bundle"

    codesign --remove-signature "APPPATH/Contents/PlugIns/fmodstudio.bundle"


    After these steps, the game runs fine. FMOD is working, everything seems to be good.

    codesign -o runtime -f --deep -s 'Apple Distribution: COMPANYNAME' --entitlements "PATHTOENTITLEMENTS.entitlements" "APPPATH"


    After running the codesign (which doesn't return any errors), my game no longer opens. It keeps spinning indefinitely at launch, and I have to force quit it.

    Here's the entitlements file I'm using :

    Code (csharp):
    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.     <key>com.apple.security.app-sandbox</key>
    6.     <true/>
    7.     <key>com.apple.security.automation.apple-events</key>
    8.     <true/>
    9. </dict>
    10. </plist>
    11.  
    Any ideas on what I may be doing wrong here?
    Thanks!