1

Android has very good tools for creating different variants of an app (for example, the exact same code but with a different logo). You just create a different flavour and put a different image for each flavour's directory. How do I achieve this in Xcode? The information I have found on the web is very bad. I tried creating a new target for my project but that created a new storyboard, AppDelegate etc. It just created a new app altogether. I want different resource folders for different brands of the app. I'm using Swift.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Questioner
  • 2,451
  • 4
  • 29
  • 50
  • 1
    Don't create a new target, copy your original target. – rmaddy Feb 11 '16 at 16:04
  • First of all, I don't know how to do this and can't see an option (only "add target"). Second, won't this just copy every file? If I have to edit code that's not brand specific I can't edit it for each brand. – Questioner Feb 11 '16 at 16:06
  • Right-click on the target and select Duplicate. And no, it won't copy every file. – rmaddy Feb 11 '16 at 16:09
  • @rmaddy I have done this now but where do I put the different files and how do I set it so that it uses them when I select that new target? – Questioner Feb 11 '16 at 16:19
  • It's no different than setting up the original target. – rmaddy Feb 11 '16 at 16:20
  • There is a very good Step-by-Step Tutorial, linked in [this answer](https://stackoverflow.com/questions/7975729/two-versions-of-ios-app-free-and-paid-how-to-conditionally-change-project-id/) – Bojan Hrnkas Jul 04 '19 at 12:34

1 Answers1

0

You're not likely to get the same kind of setup you could have with Android. There are a bunch of features you could use individually or in combination. rmaddy's comments are good. Another option is creating additional schemes and setting the properties of the project for each one. The important thing to keep in mind is that the simplest solution may not look the way you're expecting.

skagzilla
  • 325
  • 2
  • 10