Edit: Turns out this was not a codesigning issue, so I'm updating to help anyone who runs into the same problem.
After updating a MonoMac app to Xamarin.Mac, if I changed the name of the app, I would get the message "You can't open the application "XXXXX" because it may be damaged or incomplete." It looks like it could be a codesigning issue because when I would run codesign --verify
I would get code object is not signed at all
.
Original question:
I recently updated a MonoMac app to Xamarin.Mac. In the process, something in the codesigning step seems to have changed. Specifically, now when I rename the app bundle, I get codesigning signature errors, both from the GUI and from the command line tools. It seems that if the app bundle does not match CFBundleName
, the signature isn't valid.
For example, if I run codesign --verify --deep -vvvv Program.app
(where Program
matches the CFBundleName
, I get
Program.app: valid on disk
Program.app: satisfies its Designated Requirement
However if I change the name to Program2.app
and run codesign --verify --deep -vvvv Program2.app
, I get:
Program2.app: code object is not signed at all
Move it back, and I get a successful signature again.
From looking at the MonoMac app vs. the Xamarin.Mac app, there are a few differences:
archived-expanded-entitlements.xcent
is now placed inContents/Resources
Info.plist
gets compiled to some binary-ish version.Contents/MonoBundle
now includeslibMonoPosixHelper.dylib
, which apparently needs signing.PkgInfo
is now included inContents
, with contentsAPPL????
Why do the codesigning tools care about the name of the app all of a sudden? How can I make it not care about the name?