Targeting a static library to Mac and iPhone

370 Views Asked by At

I have a few static library projects which are used in a Mac application, I'm working on porting these libs to the iPhone and I would like to use the project to build both the Mac and iPhone versions.

For that purpose I setup an additional target for the iPhone. This looks like it should work but I see that if I try, for example, to add the UIKit.framework to the project, the framework appears in red.

The problem is, as far as I can see, that in the main project settings "base sdk" is tiger (don't ask). I think I can't change this because I still have a target for mac. Or should I?

So the question is, is it possible to target both mac and iphone from the same project and if so, what should I do with the "Base sdk" setting in the main project setting?

1

There are 1 best solutions below

1
On

The main project setting doesn't matter. Override the SDK of the target instead.