Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Xcode / IOS multiple apps with same code base / project

I'm trying to set-up xcode to allow me to build / publish 2 apps using the same code but with different app icons, assets and a different database.

if I have 2 apps using the same code:

  • app 1: fruit list (display a list of fruits)
  • app 2: Veggie list (display a list of Veggie)

For both apps I would have a unique bundle ID (of course), same code, but different images and database. How can I set-up Xcode to have 1 project and be able to select what app I want to build?

I seem to understand we have the option to use schemes, targets or build configuration but so far what I found was more confusing than anything else.

Any suggestion / help on this would be welcome! I sound like a mad solution to have multiple projects in this case and duplicating changes from one to the others.

Thank you.

Answer*

Draft saved
Draft discarded
Cancel
5
  • Thank you for this answer Jnpdx, it sound like what I need indeed. Thelink you gave me helps but the guys speak about already having the target set-up. One of the issue I face is that I can't seem to find how to create/replace the targets that are created by default: project, projectTest and projectUITest. Commented Mar 23, 2021 at 10:29
  • You don’t necessarily have to replace those. "Project" could be one of the apps I mention above. Then, add another target and share source between them. Commented Mar 23, 2021 at 12:58
  • I must miss something very simple, I get stuck trying to find how / where to add a target in Xcode. Commented Mar 23, 2021 at 13:41
  • It’s not in front of me right now, but I believe it’s just File menu -> new -> target Commented Mar 23, 2021 at 13:50
  • That was indeed much easier where I was searching, thank you for this! Commented Mar 23, 2021 at 13:53

default

AltStyle によって変換されたページ (->オリジナル) /