0

I have an app that will be sold to multiple clients.

My main concern is:

If a bug is found in my app, and I have fixed the bug in one of my clients' app, how can I automatically apply the same fix to all clients, let say 1000 client?

Edit:

Let say my app is a restaurant app, I sell it to multiple restaurants each has their own backend, app store account. Just the colors, logo are different. The code is the same.

malhobayyeb
  • 2,725
  • 11
  • 57
  • 91
  • You should be releasing your app through some sort of app store which will take care of this sort of thing for you. Or you can have the app check for and download updates from a dedicated server which you maintain and can release updates through. I think Circle CI does this – smac89 Apr 20 '16 at 17:07
  • @Smac89 My app is not single app for clients. It is an each client copy has different backend and submitted to the store in client's account. – malhobayyeb Apr 20 '16 at 17:15
  • Are you effectively building and delivering a separate app "bundle" to each client? – Dan Cornilescu Apr 20 '16 at 17:30
  • @DanCornilescu Yes thats what I am doing. But I am doing it manually. And I do not know what his business is called. Enlighten me please :) – malhobayyeb Apr 20 '16 at 17:32

2 Answers2

1

There are several possible approaches, each with pros and cons, depending on your preferences, experience, actual development process, app structure, etc.

  1. Using multiple branches in a single VCS repository.

The shared code would go in a master branch. Each customer-specific artifacts and customisations (possibly including code deltas as well) would go in a customN branch pulled off the master branch. The fix could be initially committed into one of these customN branches (for example in order for the customer to validate the fix or multiple iterations of a fix before they're propagated to all customers). If so then the fix would have to be double-committed to the master branch. Or it could go directly in the master branch. From there the fix would be propagated to all the other customN branches via syncs, most of which should be trivial. Followed by a re-build of the respective customer package in a workspace which contains the respective customN repo branch.

  1. Building a customer package would be done in a workspace containing 2 repositories:
    • a shared repository containing the shared code
    • a customN repository containing the customer-specific artifacts

The fix would only be committed once, in the shared code repo, distributing the update to a customer would simply mean pulling the respective customer workspace (which automatically gets the updated shared repo) and building the package.

It might be possible to just symlink the shared repo inside a workspace instead of instantiating a copy of it, potentially speeding up the package builds.

This approach doesn't work (well) if you need per-customer code deltas as well.

  1. Use a "nested repository" approach, if your VCS system supports it. For git see Nested git repositories?. I didn't actually use this approach, IMHO it's unnecessarily complicated.
Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
1

You describe a very challenging requirement.

Here are some suggestions:

Componentise your application

Try and build your application as components. Some components will be custom for each client, but hopefully the majority of components will be generic.

This should make it easier to do an update as you only need to release the components that have been impacted by the bug.

Build an automated update mechanism

Build an automated update mechanism. Build this in to all your applications so that updates can be pushed out to all your clients.

You may also be able to find a proprietary automated update mechanism available off-the-shelf.

Run continuous integration for all the versions of your application

A major challenge will be to ensure that each bug fix does not introduce other bugs into the many versions of the application. The best way to do this is to have a suite of automated regression tests that cover the most important functionality in your application. Configure continuous integration so that each and every version of your application is built and then tested.

This should give you the confidence to roll out an update across all your client's applications.

Barnaby Golden
  • 4,176
  • 1
  • 23
  • 28