Xcode Link Frameworks "Relative to Current SDK" Doesn't Work When Mixing Mac Framework and iPhone St

Posted by bl4th3rsk1t3 on Stack Overflow See other posts from Stack Overflow or by bl4th3rsk1t3
Published on 2010-04-26T03:53:12Z Indexed on 2010/04/26 3:53 UTC
Read the original article Hit count: 548

Filed under:
|
|
|
|

I have a framework of code I maintain. It's got mac and iphone objective-c code. And some of it is shared. I'm not having any problems with code. It's a problem with Xcode.

Let's just call my framework "AwesomeKit" for this problem.

The first thing I did was create an xcode Framework project called "AwesomeKit". Add source files to it, link against the common mac frameworks: foundation, cocoa, carbon, etc. It compiles fine.

Then, add a new "static library" target, let's call it "AwesomeKit-iPhone" and set the base SDK in the build settings to iphone device 3.1.3.

The problem comes when I try to add "Existing Frameworks" to the AweseomKit-iPhone target.
-First change the current build target to AwesomeKit-iPhone.
-Right click on any group and select "Add > Existing Frameworks..."
-Choose UIKit.framework

UIKit will immediately be highlighted red, as if it's missing. It is indeed missing because Xcode uses the "Relative SDK" setting from the "Mac OS 10.6" SDK. When it should be using it relative to the current target's base sdk iphone device 3.1.3.

What the heck? Has anyone experienced this? This is really annoying.

© Stack Overflow or respective owner

Related posts about xcode

Related posts about relative