19

Ok so I have just about managed to get to this point on my own but am now having some issues code signing the app specifically with the AdMob framework. I am getting this error: Command /usr/bin/codesign failed with exit code 1 the details it are giving are as follows: Applications/MyApp.app/Frameworks/GoogleMobileAds.framework: bundle format unrecognized, invalid, or unsuitable

I have read the other posts on the site and tried many different ways of fixing this. If I untick 'Code Sign On Copy' the archive builds successfully but then fails on validation with a match error. This is how I have my frameworks set up currently: enter image description here Any help would be much appreciated!

dwinnbrown
  • 3,789
  • 9
  • 35
  • 60

5 Answers5

73

I saw this same issue with a different framework.

The solution for me was removing the framework from the 'Embedded Binaries' section and only adding it to the 'Linked Frameworks and Libraries' section in the target 'General' tab.

enter image description here

digitalHound
  • 4,384
  • 27
  • 27
2

I have just seen the same issue but with a different framework that was the social framework and then I did below: go to build phase -> embed frameworks -> press copy only when installing check box then it worked with me with no error enter image description here

1

I had a similar problem but with a different framework. The solution for me was to make sure that the framework was present in these three places:

General tab:

  1. Embedded Binaries
  2. Linked Frameworks and Libraries

Build Phases tab:

  1. Embed Frameworks
Cue
  • 2,952
  • 3
  • 33
  • 54
1

I ran into this issue when using a different framework. Clear the DerivedData solve this issue. https://docs.sentiance.com/sdk/troubleshooting/ios/bundle-format-unrecognized-invalid-or-unsuitable

  1. Go to Xcode menu bar and select File > Project Settings (or Workspace Settings).
  2. Under Per-User Workspace Settings, find the shortcut to DerivedData folder and open it via Finder.
  3. Remove the entire content of the folder and empty the Trash.
  4. Restart Xcode.
Frank Teng
  • 69
  • 3
0

In Xcode 11.*

Target -> General -> Linked Frameworks and Libraries
change related framework with option "Do Not Embed"

Else Check on the :

Target -> Build Phase -> Link Binary With Libraries
Check status with Required/Optional - try it with required first.