I'm looking for the best approach to customize our iOS app so we can easily create white label versions of it and keep them all in sync.
One approach is to put the entire codebase in a static library project. Then create a separate project for our main app and each white label app. These projects would each contain a reference to the codebase library as a sub-project, and their own assets like icons, loading images and a Info.plist file.
My colleague has successfully used this approach with our Android sister project in Eclipse.
Unfortunately this approach might not work in xcode. xcode does not seem to allow some resources to be bundled with a static library, like the Settings.bundle and Localizable.strings which are essential.
Is there any way I can use this approach in xcode, or am I better off just referencing the codebase folder from each project?
Edit:
Originally I was planning to just reference the codebase folder from each project, but found that this approach would require re-adding the codebase directory in every project each time a file was added/removed/renamed in the codebase.
I've done white labelled apps. You should try targets first. Targets are contained within projects. You can include your sources in the same project. Put everything that varies into just a few files, and vary which of those files you include in each target.
You will still need to make sure files are in all your targets, but you'll be prompted or get a linking error and if you miss a file including it is just checking a checkbox.
You can keep the target-specific files pretty limited. I have a common xcassets file and one for each target. I also have separate plists and few other resources for each target. Everything else is shared.
References:
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