I have 4 different XCode projects for different modules on different branches of git. I want to make a common project/app through which i can call all 4 modules. There modules are to be displayed like list in table. Through a common login all modules will be called. How can i do this?
what i have Done till now: I have taken all modules checkout and added them in a single workspace. But without making them framework, i am unable to call them from the common project. Also my modules are large and framework classes to accessed need to public. So is there not any other good way to do this. Hope i am able to clearify my problem..
thanks
You can just drag-and-drop any xcode-project file (*. xcodeproj) into the project navigation pane of your desired parent-project. You then may need to add target dependencies, depending on your needs.
In the Choose a project pane, choose the Browse button to select an Xcode . pbxproj file. Navigate to the project file in the Select Xcode project file dialog, and then choose Open.
Create a new IBOutlet called shakeButton for your storyboard button in your ViewController. swift file. Select the shake button in Interface Builder. Then hold down the control button ( ⌃ ) and click-drag from the storyboard button into your ViewController.
To solve this you need a dependency management solution, because you want changes to the individual projects to be reflected automatically in the overall project. You have decided you can't use frameworks which are the natural choice for this, for practical reasons (the framework class size and access level).
The solution is to find a different dependency management solution for your source code.
The next most obvious option is to use git submodules, because this has been explicitly designed for modularising at the source level. If you use this in conjunction with the solution suggested by @sjwarner for project organisation you should be able to achieve what you need.
https://git-scm.com/book/en/v2/Git-Tools-Submodules
"Submodules allow you to keep a Git repository as a subdirectory of another Git repository. This lets you clone another repository into your project and keep your commits separate."
In other words you can continue to maintain each view controller separately, and the commits can be included into your overall project.
(Note that the submodules do not have to be the individual projects themselves, you could potentially make only the viewcontrollers separate submodules, but this might be a bit more complex to set up and maintain)
a) make each project containing the view controller you want a git repository if it is not already one.
b) create a git repository for your main project (if it is not already one)
c) add each project as a git submodule to your main git repo
d) follow @sjwarners suggestion on source code organisation for the overall project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With