I have an app A and an app B and I made a new App C, then I wanted to integrate this new app into the old ones as a part of them so that each of the apps A and B will have a section that holds the app C. How should I proceed to realize such integration and ensure the modularity of my new app?
2 Answers
It sounds to me like in the end, the user will see two apps (A and B), and in some section of those apps, there is a common part (C) that is the same. To the user, there is no App C that they download. You goal is to share the code for C between A and B.
I would watch the 2019 WWDC video about the Swift Package Manager and put the code for C in a swift package that you share in the other two apps. You should think of C as a framework or package, not an App.
If you need apps to share runtime information with each other (like you need user data entered in B to show up in A), and you want that to happen on the device, then look into app groups.

- 87,846
- 14
- 132
- 192
If they really are three separate apps and you just want to make the code from app C usable in apps A and B, the simplest approach is a Workspace containing all three app Projects and making C code part of multiple app targets.
If you want to be more formal you can express Cs code as a framework and make that a dependency of the other two. But if we are speaking purely of source code, the new Xcode Package Manager integration is a simpler solution. However at the moment the package cannot hold resources such as a storyboard, so if you need that a framework is the only solution.

- 515,959
- 87
- 875
- 1,141