Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Error - missing required architecture i386 in file

I'm getting this error when building my iPhone application:

ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library /Frameworks/UIKit.framework/UIKit, missing required architecture i386 in file

It goes the same for all the frameworks in my app. It's very weird since this was not happening earlier.

like image 994
Gabe Shahbazian Avatar asked Sep 21 '09 18:09

Gabe Shahbazian


2 Answers

This happens when you add a framework to your project and unintentionally copy the framework into your project directory.

The fix is to check your project directory (where you store your project on disk) for any iphone SDK *.Framework files and delete them.

Project will build fine afterwards.

like image 67
Jordan Avatar answered Oct 08 '22 08:10

Jordan


I had this same problem, and the solution turned out to be an easy fix. Backup then open project.pbxproj (located inside your project file bundle) in TextMate or TextEdit and search for the section titled "/* Begin XCBuildConfiguration section */". Look for a key named FRAMEWORK_SEARCH_PATHS and delete it and it's contents (once per build configuration, so I removed it in two places). Here is an example of what I deleted:

FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "\"$(DEVELOPER_DIR)/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.1.sdk/System/Library/Frameworks\"",); 

My project now build for both the iPhone device and the iPhoneSimulator.

like image 20
Sean Roehnelt Avatar answered Oct 08 '22 08:10

Sean Roehnelt