Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

osx 10.9.5 code signing V2 - signing a framework with: bundle format is ambiguous

I'am trying to code sign an app bundle on osx mavericks 10.9.5 with format v2. On previous testing the signing on 10.9.5 (13F12) all went well, all frameworks could be signed without error. Now, on 13F34, the frameworks could not be signed any more. When i try to sign the first framework with:

codesign -f -v -s "Developer ID Application: MY AG" "My.app/Contents/Frameworks/4DJavaScript.framework"  

then the error occurs:

My.app/Contents/Frameworks/4DJavaScript.framework: bundle format is ambiguous (could be app or framework)  

When I try to code sign the only version (A) of the framework, the signing succeeds, but on signing the main app the error on the framework reappears. On looking into the info.plist file of the framework there is (in my sense) the correct entry for the type set:

Bundle OS Type code FMWK  

Any suggestions on how to code sign a framework correctly on 10.9.5-13F34?
Thanks, Peter

like image 716
Peter Avatar asked Sep 22 '14 08:09

Peter


4 Answers

Your answer didn't work for me so I post mine.

If you previously copied frameworks with cp -r command you will have this problem. With cp -a this problem doesn't appear. That's happening because of different way of resolving symlinks in these two options.

like image 117
htzfun Avatar answered Nov 16 '22 00:11

htzfun


Immediately after posting the bounty on this question, I figured it out. Signing the current version of the framework directly does the trick:

codesign -f -v -s "Developer ID Application: My Dev ID" MyFramework.framework/Versions/Current
like image 26
Andrew Madsen Avatar answered Nov 16 '22 02:11

Andrew Madsen


I was using electron-packager and needed to use the --no-deref-symlinks flag and bam working for me

like image 39
KleggerKoder Avatar answered Nov 16 '22 01:11

KleggerKoder


I ran into the same problem. In my case the problem was that the .app file I was trying to codesign was stroed in a dropbox folder.

Apparently, dropbox resolves symbolic links by default, i.e. symlinks are completely replaced by the data they point to. Read about it here.

The codesign command cannot recognize the format of the bundle after dropbox resolves the symlinks.

The solution is to not store the bundle you are trying to codesign in a dropbox folder.

like image 41
J.beenie Avatar answered Nov 16 '22 00:11

J.beenie