1

I have an iOS app which is branded for different clients. This means that the Base code is the same for most of the clients, but the graphics are different and some custom code.

What I would like to do is to keep the Base code in one project, and for each client create another project with custom graphics and code.

I think such a thing would be simpler with Java and Eclipse, but is it possible to do this in Xcode without creating a framework for the Base code?

2 Answers 2

3

When I've done something like this, I've used "targets" within a single project. For each target I define which files are compiled/copied.

To keep things organized, I put target-specific files in their own directories on disk and create matching groups in the project.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks! That is actually what I use now, but this gets more problematic as the number of targets increases to more then 20. An also it takes longer to check out all the resources.
In that case, maybe I should be asking why "without creating a framework" is a requirement?
As I see it there is no point in creating a framework just to keep the project organized. After all we are not planning to distribute it. And also, having a framework its more limiting (e.g. dynamic frameworks are only supported in App store from iOS 8).
Fair enough. I'm in a situation where there are enough different client apps that app code and core code are handled by different teams. At that point it makes sense for the core to be a framework or library even for internal distribution.
1

You could use a workspace which has different targets for different versions of your app.

That way you can include the base code in all targets, and the customised code and assets to each specific target.

5 Comments

What would be the point of a workspace, or did you mean to say project? Are you suggesting the same solution as @Philip Mills ?
Sort of. You can have multiple targets in a project, and you can have multiple projects in a workspace. The important point is that you can have a single IDE window that builds multiple targets.
That's true you can have multiple targets and all the projects grouped in one workspace, but in may case I have a base project that has most of the app implementation, but it doesn't really provide a build target since there are no resources, and there is a second project in which I would like to use the classes from the first, but I actually can't. So that my problem. I'm starting to think that this is not possible, and I should think of another solution.
What makes you think you can't use the base project files?
I tried it. Make a Project1 with File1.h and make a Project2 with File2.h. You can't include in File1.h in File2.h. You would have to make Project1 a framework and include it in Project2, but as I said in a previous comment, creating a framework is a hassle.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.