How to make same iOS Swift App with only some differences in the code and assets with scalable and clean mode

前端 未结 3 2086
礼貌的吻别
礼貌的吻别 2020-12-04 03:05

I have this needs.

I developed an app and I want to duplicate it. I can copy and paste the project but if I do this 10 times can be a problem. The problem is, if I f

3条回答
  •  悲&欢浪女
    2020-12-04 04:00

    I would do this with Git:

    In your origin repository, prepare your project with placeholders:

    • Try to make a file where you define constants for the domain, the integers you mentioned etc. That file you could call Constants.swift.

    • Put all assets you need to change in one .xcassets. (a different one than the assets that will stay the same) For example the Icon. You can already add the image-sets you want to have in your apps, but leave them empty (or alternatively add placeholder images)

    • Write a placeholder for the app name and package name

    • create a default splash screen (I guess you mean the launch screen). This could either be empty or if you want it to be similar in all apps, prepare it a bit so you don't have to change much for each app

    When you have committed and pushed your main project, create forks for each of your apps. In the forks, you can change everything that you have prepared as placeholder.

    If there is a but somewhere, fix it in the origin. Then you can merge the changes easily to each of your forks.

提交回复
热议问题