开发者

Is it possible to have multiple project types (target platforms) in one Xcode 4 workspace?

In Xcode 4 I want to use the workspace to have multiple project types and have these projects reference static libraries which will hold common functions like data access code etc.

Is it therefore possible (or correct) to have a Mac/iPhone/iPad project in the same workspace a开发者_Go百科nd have each reference static libraries (also in the workspace) just like you can do with a Microsoft Visual Studio Solution.

Or is it that a workspace should contain one application type, say a Mac application, and then include the static libraries into each workspace, thus ending up with 3 workspace projects one for each of my target platforms?

Many thanks.


You can mix any projects whatsoever. There's no limitation or warning against different platform types - in fact, Workspaces are there with this (shared library between a Mac OS and iOS application, each in its own project) in mind.

The only thing you need to worry about is how to manage your build schemes. That is, do you want to build all products of all projects each time this scheme is run, and which executable to run among all those projects when you hit "run", etc.


This might help Building Static Libraries to Share Code on iPhone AND Mac OS X Projects and another similar question here on SO How do you create hybrid XCode projects for Mac & iPhone?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜