Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"object file format unrecognized, invalid, or unsuitable" Xcode error

I don't see any reasons why this message should come at the end of the log:

/Users/Val/Library/Developer/Xcode/DerivedData/Mathematics-dzakmzlewrmgvibasvuixiwmkwwp/Build/Products/Debug-iphoneos/Mathematics.app: object file format unrecognized, invalid, or unsuitable
Command /usr/bin/codesign failed with exit code 1    

How can I fix this error?
I am desperate, all my certificates and profiles are valid, the app itself has no bugs at all.

like image 538
Peter V Avatar asked Sep 07 '11 19:09

Peter V


2 Answers

I ran into the same issue with Xcode 7.0.1 and cocoapods. I ended up doing the following:

  1. Closed Xcode
  2. Removed everything under my DerivedData folder

    rm -fr /Users/{user}/Library/Developer/Xcode/DerivedData/*

  3. Restarted Xcode and rebuilt the project

like image 95
Ray Hunter Avatar answered Oct 19 '22 11:10

Ray Hunter


For me, this turned out to be the Build Settings/Build Option/Compiler for C/C++/Objective C had become mismatched between Project and Target ... set to default in each case and problem resolved.

like image 45
Ken Pletzer Avatar answered Oct 19 '22 10:10

Ken Pletzer