views:

364

answers:

7

For some reason, my application will install and run fine on my device, but when I try to install my application on the iPhone Simulator, I get these warnings:

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


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/Foundation.framework/Foundation, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CoreGraphics.framework/CoreGraphics, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/CFNetwork.framework/CFNetwork, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/AudioToolbox.framework/AudioToolbox, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration, missing required architecture i386 in file


ld: warning: in /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.0.sdk/System/Library/Frameworks/QuartzCore.framework/QuartzCore, missing required architecture i386 in file

And that causes a bunch of errors that just occur when those frameworks are just not present. Errors like:

  "_OBJC_CLASS_$_NSMutableCharacterSet", referenced from:      objc-class-ref-to-NSMutableCharacterSet in SBJsonWriter.o
A: 

It is attempting to build against the device libraries for use on the simulator. The paths should look like:

/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit

... with iPhoneSimulator.platform instead of iPhoneOS.platform. Check your build settings, clean the project and empty the Xcode cache(Xcode>Empty Cache...).

TechZen
I've changed the base SDK to iPhone Simulator 4.0, deleted and re-added every linked library, and emptied the Xcode cache and I still get the same errors, and it has not changed to `iPhoneOS.platform`
Hankweb
A: 

If I'm not mistaken, if you use base SDK > 3.2, you should set the architecture to optimized. Which is armv7. I'm not sure though.
~ Natanavra.

natanavra
A: 

I think that you set iPhone Device x.x instead of iPhone Simulator x.x as the base SDK. A similar thing hapend to me, when I did that.

tadej5553
A: 

I figured out a fix. I set the base SDK to iPhone Simulator 4.0, and because it still tried to get SDKs from the iPhoneOS, I renamed iPhoneOS.platoform to iPhoneOS_2.platform so Xcode cannot access the SDKs from that platform.

Hankweb
But I shouldn't have to do that! I want this to just work on both the simulator and my device!
Hankweb
It's apple clownware. Get used to it.
x0n
A: 

I am having the same problem. Where is the IPHONEOS.PLATOFORM located that you rename to get it working?

john john
`/Developer/Platforms/iPhoneOS.platform` is what I'm renaming.
Hankweb
A: 

You need to go to build on the top menu bar and press the option clean all targets

Carter Kristek
Still 255 Errors and 15 Warnings.
Hankweb
A: 

The Answer is:

1) The Base SDK should be Device

2) iPhone SDK Frameworks were copied into your project directory (on disk). Open your project directory and remove any standard iPhone SDK Frameworks.

3) Clean Caches and Rebuild

Jordan
Did all of that three times, still, no success. I removed every framework and re-added it from R.Click>Add>Add Framework..., and from the iPhoneSimulator.sdk file, neither worked.
Hankweb
Re-install the SDK and you'll be good to go.
Jordan
Re-install the SDK.
Jordan