Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to manage updates on an iOS client/server app

Tags:

versioning

api

I have a logistical question: I'm trying to figure out the best way to manage APIs getting out of sync with an app. The best way to explain it is with an example:

Let's say MyApp Version 1.0 posts to a "submit_feedbacK" API that requires first_name, last_name, and email.

I then submit MyApp Version 2.0 to the App Store. That version is designed to post first_name, last_name, gender, and email to the API. All of these are required fields on the API.

The problem I have: - If I update the API before the new App is live, it will break Version 1.0 - If I wait until Version 2.0 is live and remotely cripple 1.0, I have to time it correctly.

I'm going to guess that the 'right answer' is to maintain two different APIs. But if both APIs post to the same live database, that makes things a bit awkward.

Does anyone have suggestions on how to model this?

like image 879
Anthony Avatar asked Jun 27 '12 00:06

Anthony


People also ask

Does iOS have in app updates?

On your iPhone and iPad, apps that you download from the App Store are automatically updated by default. But if there's an issue, you can update an app manually.

Can I update iPhone software remotely?

Administrators can also remotely install an iOS update on your device. If your device uses a passcode, you'll be asked to enter it before a remote update can be installed.


1 Answers

This question may share some aspects with iOS consuming API design.

The right answer is definately to provide two APIs (at least for a short period of time while users adjust). You do not have to maintain two versions at the same time, as once a newer version is released you can maintain that one, and simply provide the old one for legacy users. The only real changes you may have to make to it are things like security patches or major issues. Major changes (such as you deciding to restructure your entire database) may lead to the old version not working any more, however update to newer API versions should be designed to allow previous versions to still function.

The other question I linked you to gives an answer about how you can have different version of your app access the correct version of the API.

Another note is that it may be easier for you (depending on what framework you're using) to design your APIs as engines or subapps, and simply mount them at different end points. I know that this is easily do-able in Rails by using Engines, and in Node with Express using app.use() with sub-applications.

like image 150
Nick Mitchinson Avatar answered Dec 04 '22 18:12

Nick Mitchinson