Visual Studio Solution Behavior in Xcode

Is it possible to have multiple projects in one xcode project available for simultaneous development?

A specific situation is the presence of an application library and middleware while developing in Xcode: the entire source is available for modification (both for the application and for lib), but the library code is embedded in the library and attached to the application in its own assembly.

Visual Studio processes it using solutions and projects inside, dependencies between them and build order.

What are the steps to get as close to this behavior?

+4
source share
2 answers

An Xcode project may contain other Xcode projects, so you can configure a top-level Xcode project to simulate a VS solution file. This is not a perfect match; for example, there is no Find in Files command that will work in all subprojects, although you can set up a custom search that will do the equivalent for you. However, you can say that a top-level project will be created and it will build all the subprojects.

To do this, start by creating an empty project: File> New> Empty Project.

Then add a target to it by right-clicking the Goals icon and choosing Add> Create Goal ...> Aggregate.

Now add the library projects to the empty project: right-click the project icon and choose Add> Existing Files ..., then browse to the .Xcode project file.

+4
source

If I understood your question correctly, I think you mean Xcode WorkSpace . You can put several projects in one workspace, edit / build / link everything together.

Here is a tutorial that I found very useful:

http://blog.carbonfive.com/2011/04/04/using-open-source-static-libraries-in-xcode-4/

In this document, you add your application and static library to the Xcode4 workspace and how you link the library to your application. It also contains useful information on how you create a library that is more reusable.

I managed to create a simple command line tool that is linked to the .a library following this tutorial.

Hope this helps.

+2
source

All Articles