Check for latest app version?

Hi,

I am about to roll out a new version of my iOS app, but before I do so I want to prompt all users who have older version to go to the Apple store and download the latest version.

How exactly do I do this?

I would greatly appreciate any help, as I have been unable to find the answer myself.

Below is a example image of what I am trying to achieve.

Thanks in advance! :slight_smile:

I think you’ll need a txt or JSON file with a version number on a server somewhere, which is downloaded when the app starts and compared against a version number stored on the device. 

If you haven’t got any web hosting already then you could try on of the free ones:

https://www.techradar.com/uk/best/best-free-web-hosting

You can probably also grab the info from the App Store/ Google Play but this is probably more hassle to get working, unless someone has some ready-made code they can provide.

Like @nick_sherman said. The method that I’ve found the easiest for me has been to have a php file on a server that, when called, returns the current version code of the app. This number is then compared to a locally stored number. If the numbers don’t match, then the user is told to update.
 

Now, since you don’t have this kind of system already set up, it means that you are out of luck for the time being. If this system doesn’t exist in the version of your app that your users currently have, then it can’t just magically appear there. This is really one of those features that has to be included since the beginning. Now your users need to update their apps to a version where you have this check and then it’ll work for all future updates.

I don’t force users to download the latest app but I do notify them that a new version exists. You can do that automatically with OneSignal, GameSparks, Flurry (with some native work) or a bunch of other services.

@agramonte, if you have a game with multiplayer components or user generated content, then you may have to.

I’ve worked on some games with user generated levels, so whenever a user tries to download a level, the server first checks if the level’s version is the same or older than that of the user’s app. Trying to load levels with new content not yet defined in older versions is bound to lead to crashes or bugs. Same thing with multiplayer games where a balance patch or general update has been applied.

 

I think you’ll need a txt or JSON file with a version number on a server somewhere, which is downloaded when the app starts and compared against a version number stored on the device. 

If you haven’t got any web hosting already then you could try on of the free ones:

https://www.techradar.com/uk/best/best-free-web-hosting

You can probably also grab the info from the App Store/ Google Play but this is probably more hassle to get working, unless someone has some ready-made code they can provide.

Like @nick_sherman said. The method that I’ve found the easiest for me has been to have a php file on a server that, when called, returns the current version code of the app. This number is then compared to a locally stored number. If the numbers don’t match, then the user is told to update.
 

Now, since you don’t have this kind of system already set up, it means that you are out of luck for the time being. If this system doesn’t exist in the version of your app that your users currently have, then it can’t just magically appear there. This is really one of those features that has to be included since the beginning. Now your users need to update their apps to a version where you have this check and then it’ll work for all future updates.

I don’t force users to download the latest app but I do notify them that a new version exists. You can do that automatically with OneSignal, GameSparks, Flurry (with some native work) or a bunch of other services.

@agramonte, if you have a game with multiplayer components or user generated content, then you may have to.

I’ve worked on some games with user generated levels, so whenever a user tries to download a level, the server first checks if the level’s version is the same or older than that of the user’s app. Trying to load levels with new content not yet defined in older versions is bound to lead to crashes or bugs. Same thing with multiplayer games where a balance patch or general update has been applied.

Â