Xcode 8.1GM fails to codesign .bundle with Resources dir

I've seen this error in the past but it's come back. 😟


Here's what it spits out (redacted)

CodeSign ~/Library/Developer/Xcode/DerivedData/...BundleName.bundle
    cd ~/.../Pods
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
    export PATH="..."
   
Signing Identity:     "-"


    /usr/bin/codesign --force --sign - --timestamp=none ~/Library/Developer/Xcode/DerivedData/...BundleName.bundle


~/Library/Developer/Xcode/DerivedData/...BundleName.bundle: bundle format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1


Have development pod with .bundle packages in the src. Those packages have directories named Resources. If we change it to anything else, the problem goes away.


Worked fine on Xcode 8.0

Replies

I have solved the problem with change cocoapods 's target config.

1st,you should find the target or bundle who has problem.

2nd,you may find the error bundle and select [General] button

3rd,tap the [Choose Info.plist File...] button. and add a infop list. cocoapods has a common infoPlist , you should find it .

4rd solve problem

Is this will solve this problem permanently or it will come back when i pod install?

I think I did this in the "General"

Yes, you can delete pods and reinstall it and the error still missing 🙂

1) I updated my the pod spec I was using:

// FROM:
  spec.resource_bundle = {'BundleName' => 'root/Source/Resources/'}
// TO:
  spec.resource_bundle = {'BundleName' => 'root/Source/Resources/*'}

2) Run pod install with the new podspec.

3) Then I did a hard clean of the build folder. Shift+Option+Command+K

What made you think to try adding an Info.plist fiel?

This SO answer fixed my issue although I don't know why it works... http://stackoverflow.com/a/40019234/1032900

Unbelievable! Only one of my Targets was not working. And that solution posted on stackoverflow worked for me.