简体   繁体   中英

How to deal with obsolete api’s in a mobile app

The fictitious situation is the following: I have a mobile application that has been published to the store for about a year now (both for iOS and Android). I'm preparing a new version of the application. Some of the api's in the back end are obsolete or deprecated.

The problem is that users of the application that would not update the app to the new version will experience problems with the operation of the app because the back end api's have been replaced or removed.

The question is how to deal with this situation before becoming a problem? Are there any guidelines from apple or google for obsolete functionality between different versions of the application?

@Dimitris, Here you need to provide force update to the old apps. This can be done using app configuration file. Basically, you will have an app configuration file which contains JSON with following keys:

 { "server":{ "app-server1-base-url":"http://", "status":{ "is-running":true, "message":"We are busy upgrading XYZ server with technology and features. We will be back soon. We apologize for the inconvenience and appreciate your patience. Thank you for using XYZ!" }, "force-update":{ "status":false, "message":"Please download the latest version of XYZ from App Store to continue using the app. Thank You!" } } } 

Here 'app-server1-base-url' key will be base URL for the app. you can put all the service URL in this file.

Case 1:

Your app will check this at the time of launch whether force update available or not to the app.

Case 2:

API versioning can be done if you want to handle it using backend.

Note: Please keep configuration file on services like AWS S3 etc.

As Puneet Sharma said in this post: https://stackoverflow.com/a/18756151/8354952 .

Almost all changes to the iOS versions are additive and hence an application build using lower version still runs on the higher iOS version. But we also need to notice that APIs are introduced or deprecated and behaviors of existing APIs may occasionally change.

Basically the old version application may run on the latest system version. But some special api or class may be deprecated, this will cause some weird behavior or crash. So Apple or Google will also recommend user to update old version applications.

For the api from our own server, we can do the application compatibility by ourselves. Upload the current version identifier, the server can transfer different types of data through detecting the identifier.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM