In the past, I mainly worked on single application projects. I worked on smaller Apps but also on really big projects with hundreds of thousands of lines of code.
However, all these projects had one thing in common. They were mainly single application projects. Sure, they used dependency management systems like Cocoapods, Gradle, Maven and so on but currently I'm facing something, which I'm really new to.
In the past, I had my projects in separate GIT repositories. I had dependencies to let's say a main project (if I developed a module) and/or third party code.
When I wanted to automatically build my projects with CI/CD like TFS, Jenkins or Hudson, all I had to do was to setup a trigger on pushing to my repository and I was good to go.
Now I'm working on an iOS project which is different. I have one project with multiple targets which create different apps. The different targets share some core functionality but they have some target specific files (like a Firebase JSON, App Info.plist or a Asset Catalog).
My problem now is, that all the targets and the core are in one GIT repository so when I push, I have no clue how I can make a differentiation between which target to build.
So heres my question: how should I properly structure my Xcode projects, workspaces and GIT repositories?
Should I separate out the core and each target into their own projects and git repo? How would I then handle cocoapods? Would I need to add the same pods to the target if they are already added to the core project or will I automatically get them in my targets when adding the core as a dependency?
Should I make the core a pod and add it as a dependency to the new target project or should I rather add the core project as a sub project? Or should I create a workspace containing the core and the target projects?
I would like to be able to fire up Xcode and modify all my code simultaneously without opening multiple windows. I'd like to have one workspace where I can modify something in the core, then immediately change some code in one of the targets and then run one of the apps on the Simulator.
I'm really unsure where to put which code, where to use a project and how to split out my code into multiple repositories. Where would for example a "master" workspace go? In the core repo? In each target repo? In an additional repo? Would I need to use sub git projects (if there is something like that)?
I hope you understand what I mean and can give me some advise. I'm open for every hint, every tutorial or document explaining something on how to approach such a structure. Thank you all in advance.