Reputation: 2024
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
Upvotes: 5
Views: 4623
Reputation: 514
I had the same problem. It was due to dragging frameworks from one project to another with the Copy option enabled. Even though I had later de-referenced these frameworks, and added them correctly, it still gave me these errors until I had deleted the framework directories from the project.
Upvotes: 3
Reputation: 21760
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
Upvotes: 3
Reputation: 1
You need to go to build on the top menu bar and press the option clean all targets
Upvotes: 0
Reputation: 2024
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.
Upvotes: 0
Reputation: 2092
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.
Upvotes: 0
Reputation: 2150
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.
Upvotes: 0
Reputation: 64428
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...).
Upvotes: 0