Create multiple applications with the same core

I have several separate applications that have exactly the same logic and functions, but have different icons and some design elements. The problem is that when some changes in the logic and functions occur - I need to manually add this functionality to all applications, and after that - I need to resend each application.

Maybe there is some way to share all the logic, so I need to change it in only one place, and all my applications will get it?

+4
source share
2 answers

In my opinion, the simplest solution is to have one code base with several goals. Yes, you still have to resubmit each application when you change some code, but you still have to do this?

You can choose one of your applications for conversion to the main code base.

eg. Select the application one and duplicate the target several times:

enter image description here

After that, you will want to change your schema names:

enter image description here

enter image description here

You can set the package identifier and deployment information separately for each application in the same way as before, and the icon sets:

enter image description here

To distinguish your applications in code, you can use compiler flags (Target → Build settings - Other swift flags):

enter image description here

Then you can do something similar in your code:

#if APP_ONE
...
#else
...
#endif
+2
source

( ) . . , . . , - ( , ), . . , , . . , ( ). - - .

0

Source: https://habr.com/ru/post/1651637/


All Articles