I need some advice on best practise for how I'm been developing my projects.
Say I have built an app which is completely data driven from it's database and assets. So say I am on version 1.0 of my code. I deliver 2 apps using version 1.0, i.e each app uses a different database, and are distinguished by creating different 2 targets within the same Xcode project.. because I don't want to maintain 2 versions of the code. I then create a 3rd target for another project that needs building, which requires a new feature, so now my code is at say version 2.0. However, version 2.0 inadvertently broke the apps for the first 2 projects which were compiled when the code was at version 1.0. Whilst it would be great for the older projects to include the new feature there is no time to make amendments so that they run on version 2.0 of the code, and say the client needs it tomorrow! I needed to republish them due to a small database change, which would still have run using version 1.0, but can't back up the code now! Ok, so how do I keep on top of this sort of thing coming up?
- I could as mentioned create a separate Xcode project for each client project, but then I would be maintaining multiple versions of code, and older apps won't take advantage of new features introduced in newer code.
- Another idea is, could I create a framework for each code version? I guess I would have a separate Xcode project for each app which uses a framework corresponding to the code at the point at which is was last compiled, guaranteeing it will always work with it.. I could always replace the framework with a newer one if or when its compatible. Is this a suitable use of frameworks? Can this be done? Or do I need to create a library? Clearly I'm unsure of how these work. It would need to include xibs too.
- Or, can anyone suggest to me how they would go about producing apps in the scenario described.. whereby all the apps run off the same code, although different assets, and need to manage the code versions of the apps.
Please let me know if I haven't explained myself. Thanks in advance!