سؤال

I have a Mac Pro that I usually build and sign my apps on for distribution outside of the Mac App Store (signing is required for Mountain Lion machines that have Gatekeeper even if it isn't an app store app).

I sign the applications in Terminal, and it works fine on the Mac Pro, so I went to create another Developer ID Application certificate for a Mac Book Air, successfully created an installed the certificate, but I'm completely unable to sign any apps on the air still. I keep getting the error:

object file format unrecognized, invalid, or unsuitable

The problem is that I can take the built .app file that was built on either machine and successfully sign it on the Mac Pro. If I take a .app file built from either machine and try to build in on the Mac Book Air I receive this error. I'm not getting any errors about the certificate.

Just so it's here, I use the following two lines to sign the app (which I copy to an "App" folder on my desktop):

cd ~/Desktop/App
codesign -f -v -s 'Developer ID Application: [company name]' '[appname].app'

I've checked in Keychain access and the certificates show up nearly identically on both machines. Both computers are running 10.8.3. I can't really see what the difference is that is preventing the MBA from signing the app.

Thanks for any help!

هل كانت مفيدة؟

المحلول

The Mac Book Air did not have extra Command Line Tools installed, which is what caused the problem. I needed to have Xcode 4.4 (or newer) and go to the Preferences Window > Downloads section and install the Command Line Tools from there for the code signing to work properly.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top