Hi im trying to code sign a MonoMac binary for the Mac Store via “Application Loader”. I can submit the app, but the status in “Itunes Connect” will always say “Invalid Binary” !? The reason I have to manually do this is because theres a bug in MonoMac signing. But i’m starting to pull my hair out now as it been over a day and a half.
I also get back an email saying:
Invalid Signature – the main app bundle Paper Tanks at path Paper
Tanks.app is signed but the signature is invalid.
If I try to sign the binary with this the “Application Loader” will give an error:
codesign -v --force --sign "A72F25F56B7D6C43332AE795288EA092009BE737" "--resource-rules=/Users/Andrew/Reign/Games/papertanks/PaperTanks_OSX/PaperTanks_OSX/bin/AppStore/Paper Tanks.app/Contents/Resources/ResourceRules.plist" --entitlements "/Users/Andrew/Reign/Games/papertanks/PaperTanks_OSX/PaperTanks_OSX/bin/AppStore/Paper Tanks.xcent" "/Users/Andrew/Reign/Games/papertanks/PaperTanks_OSX/PaperTanks_OSX/bin/AppStore/Paper Tanks.app"
Application Loader error = "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. The bundle contains a key that is not included in the provisioning profile: 'com.apple.application-indetifier' in Paper Tanks.app/Contents/macOS/Paper Tanks'."
So because the step above fails I then code sign the app like this:
codesign -v –force –sign “3rd Party Mac Developer Application:
Andrew Witte” “–resource-rules=…/AppStore/Paper
Tanks.app/Contents/Resources/ResourceRules.plist” “…./AppStore/Paper
Tanks.app”
Then I code sign the internal mono posix lib as the last step doesn’t seem to.
codesign -v –force –sign “3rd Party Mac Developer Application:
Andrew Witte” …/AppStore/Paper\
Tanks.app/Contents/Resources/libMonoPosixHelper.dylib
Then I build and sign the pkg:
productbuild –component “…/AppStore/Paper Tanks.app” /Applications
–sign “3rd Party Mac Developer Installer: Andrew Witte” “…/AppStore/PaperTanks_OSX-0.1.pkg”
The issue was fixed by me upgrading to Xcode 4.4