The same code base in different applications

Here is my problem: today my company has an application that communicates with a specific server, but we received requirements to develop the same application for different servers, so there are a few things to change in the application (for example, the URL for the call and the logo).

I do not want to create a completely new application with 99% of the code, the same thing in my Xcode, just for this, because it would be very difficult to develop new material.

I am wondering if it is possible to maintain the same basic code with minor changes in different applications.

Hope I made it clear, thanks.

-one
source share
2 answers

To answer my own question, I just found this guide:

http://www.itexico.com/blog/bid/99497/iOS-Mobile-Development-Using-Xcode-Targets-to-Reuse-the-Code

Various targets and preprocessor macros - this is what I need, pretty sweet!

+2
source

For something like this, I would suggest using things that are easy to manage, such as plist , etc., to make a basic application, for example, a framework that can read XML , for example, and analyze its data in different areas of your plist and apply settings based on this data for each new application that you have.

So you should have elements like url and logo , etc. in your Plist settings, and get them in the application, and not set the values โ€‹โ€‹manually inside the application. This way you can drop different image files called logo.png for each application, or edit the url value in your Plist, and the application will read the value from Plist.

However, keep in mind that Plists are good if you donโ€™t have a giant list of items, because they can be slow if you get really big, but they are so fast and convenient for the average number of items.

Hope this helps.

-one
source

All Articles