OSX Steam Notarization - UnityPlayer.dylib - Library not loaded - code signature invalid
We've been trying to notarize our MacOS build for Steam, however once the app has been signed, it always crashes with a SIGABRT error:
Dyld Error Message:
Library not loaded: @executable_path/../Frameworks/UnityPlayer.dylib
Referenced from: /Users/USER/Documents/*/GameName.app/Contents/MacOS/GameName
Reason: no suitable image found. Did find:
/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib: code signature invalid for '/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib'
/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib: stat() failed with errno=1
/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib: code signature invalid for '/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib'
/Users/UserName/Documents/SteamNotarized/GameName.app/Contents/MacOS/../Frameworks/UnityPlayer.dylib: stat() failed with errno=1
The signing seems to be successful at first: codesign -vvvv --deep --strict
returns fine and the app passes Apple's notarisation process. However once signed, running the app will immediately crash with the above error. This happens with or without uploading for notarisation, and doesn't happen before signing, so I'm thinking it's definitely something to do with the signing process.
The entitlements we're signing with look like this:
Also worth mentioning is the signing and packaging for the MacAppStore was successful and didn't return any errors like this (the development signed build ran fine), its just this Steam Notarization thing we can't get our heads around.
We are building with Mono from Unity 2018.3.10f1, but I've also tried building from 2018.4 LTS with both Mono and IL2CPP with the same issue.
Answer by falsevac · Jun 23, 2020 at 06:52 PM
Hi, did you ever figure this out? I've hit the same problem.
Thanks.
Answer by Subliminalman · Aug 21, 2020 at 05:30 AM
We've been hitting this problem and we found to not use --deep and that worked for us.