开发者

iPhone - How synchronize new app version available onto the appstore and database upgrade?

Let's say I have a Huuge database onto a server that works with a 1.0 version of my App.

Then I plan to change the database model and release a 2.0 version of the app.

When I submit my 2.0 app, there will be a day the app will be available onto the appstore. I don't know that day, nor the hour-minute-second it will be available for download.

So... how may I synchronize my database model upgrade with the 2.0 app availability, assuming that I have a way to deactivate the 1.0 version开发者_JAVA百科 calls to the server (refusing the 1.0 calls and asking the user to upgrade the app) ?

Let's take an example. You released a chat app. But after some monthes, a court of justice oblige you to ask for the user's age ? But... your 1.0 app is not designed to ask this. So you update your 1.0 database model to carry an age, and release a 2.0 app that ask the user's age if it is not known.

In that case, maintaining the 1.0 app is not an option. Users MUST update the app, or service may be down for them.

So, until the day of judgment, you can still use the 1.0 app, but after that date and as soon as the 2.0 app is available, the 2.0 app and database model must be used.


I control my apps with a navmap which is configured to read the version and the server routes. If you are worried that it should be activated after its approved, then the previous downloaded versions would fail. So you need to find a way that both the versions work as applications don't get auto updated.

Now to solve your problem, you could change the port on which you listen and serve the date accordingly. You could either create a new route which you can include in the new version and check that at the http server and serve the data. That way you will not break previous versions.

EDIT:

You can control when the application will be released after its approve by apple. So untill approval allow both versions, and once approved make changes to your database to bring down 1.0 and release the app 2.0.


So I suppose that: - you don't have anyway to inform the 1.0 user (e.g.: push notification) that his app is going to be updated to a new release and that he cannot use anymore 1.0 - you don't have anyway to block 1.0 usage (e.g.: a web service that at start-up check the app version and blocks it) So the only way for you is to proceed in this way: - update 2.0 code by passing with all your web services the app version - update the web service in this way: if the app version parameter is not passed, then it is 1.0, then returns "broken values" (e.g.: empty chat data or fake chat message like "Please update the app"); if the app version is passed and is the correct one (2.0) then pass the right values. IMPORTANT: this web service behavior is controlled by a "RELEASED_2.0" flag, initially set to 0.

So the idea is the following: you change your web service in such way that as soon as a "Version parameter" is passed you're certain that it is coming from Apple review, right? at this point you set the RELEASED_2.0 flag to 1 and then your web service will start behaving in the "new way". Of course from Apple review to App in the store will pass a few hours, but the web services and database will already behave as 2.0 even if nobody has downloaded it yet. Immediately after the app will be in the store, all users will be forced to download it.

Tricky, but should be working...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜