Codesign --deep : Internal error unloading bundle CFBundle

I just recompiled my code using Xojo 2015 R2.2 and when trying to Code-Sign using a Build Script, I run this command:

codesign --deep -f -s 'Developer ID Application: MyCompany Inc.'  MyApp.app

When I do this, I get the following crash:

2015-06-23 13:42:49.341 codesign[26943:5770618] Internal error unloading bundle CFBundle 0x7fe89264f330 <(null)> (framework, not loaded)

Anyone seen this before?

I’m running 10.10.3 with XCode 6.3.2 installed.

I’m also using MBS Plugins 15.2 prerelease versions.

Hmm - sounds like other folks are having issues and it has to do with the ‘–deep’ option, see
http://stackoverflow.com/questions/29560736/xcode-6-3-code-signing-issues-after-update

A possible solution seems to be to not use the --deep option but rather do the codesign in 4 stages:

# sign all the dylibs. 
codesign -f -s 'MyID' MyApp.App/Contents/Frameworks/*.dylib  

# sign the A version of Xojo's framework
codesign -f -s 'MyID' MyApp.App/Contents/Frameworks/Frameworks/XojoFramework.framework/Versions/A/XojoFramework   


# sign the wrapper for the framework
codesign -f -s 'MyID' MyApp.App/Contents/Frameworks/Frameworks/XojoFramework.framework   

# sign the app
codesign -f -s 'MyID' MyApp.App 

[edit: typos and formatting]

[quote=196327:@Michael Diehr]Hmm - sounds like other folks are having issues and it has to do with the ‘–deep’ option, see
http://stackoverflow.com/questions/29560736/xcode-6-3-code-signing-issues-after-update[/quote]

I can’t recall exactly where, but Sam Rowlands mentioned --deep was partially broken in Yosemite.