Search Unity

Code signing for outside of App Store distribution breaks app

Discussion in 'macOS' started by Yodzilla, Aug 6, 2016.

  1. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    I'm trying to distribute my game Hastilude outside of the Mac App Store and to do so without OS X throwing at fit at the default security levels I need to code sign my application. The last time I did this was about two years ago and something has certainly changed since then and I have no idea what. I'm able to correctly sign my application and can verify it but then the app won't run and doesn't give an error code. The steps I'm taking to code sign are:
    • Build the app in Unity in OS X (at this point the game runs just fine)
    • chmod -R a+xr "Hastilude.app/Contents/MacOS/*"
    • codesign -f --deep -s "Developer ID Application: Ghost Crab Games Inc (87FAHJK52AD)" "Hastilude.app"
    • codesign --verify --verbose "Hastilude.app"
    It then says that the app is valid on disk and satisfies its Designated Requirement. However now when I try to launch the game I get the following generic error:



    Does anyone have any idea what I'm doing wrong? Are there up to date guides for doing this because I sure haven't found one. Any help would be greatly appreciated.
     

    Attached Files:

  2. Yodzilla

    Yodzilla

    Joined:
    Mar 21, 2013
    Posts:
    48
    FIGURED IT OUT

    8/6/16 9:40:59.675 PM Finder[622]: spawn_via_launchd() failed, errno=111 label=unity.Ghost Crab Games.Hastilude.311392 path=/Users/Yodzilla/Desktop/Hastilude.app/Contents/MacOS/HastiludeOSX flags=1 : LaunchApplicationClient.cp #1136 LaunchApplicationViaLaunchDJobLabel() q=com.apple.root.default-qos

    So the app I'm building is Hastilude.app but for some reason there's something about the package that's looking for HastiludeOSX.app. That's an old name that I haven't used in weeks and I'm not actually setting anywhere and it only breaks once you code sign even though the code sign verifies.

    So I just changed the app build name back to HastiludeOSX.app and signed that and it's working like a charm. Good lord what a stupid thing.

    So is this a bug in Unity? Why would an old app name that I'm not using any more still be floating around in a build?