While the App store can alert users to software updates, many users do not proactively update a whole bunch of software (the software on my machine is about 100). It can be a lot better if you remind users to update or more in the "Check for Updates" Item when the software is turned on.
It is common practice to record the latest version number on your own server, request it from an iOS client, and compare it to the local version number, prompting for updates. This is a simple practice, with the disadvantage of requiring separate server support.
By reviewing the relevant articles, the following methods are found, similar to the above methods, but no additional server support is required. This is the best way to check for updates.
NSString *version = @ ""; Nsurl *url = [Nsurl urlwithstring:@ "http://itunes.apple.com/lookup?id=954270"];versionrequest = [asiformdatarequest Requestwithurl:url]; [Versionrequest setrequestmethod:@ "GET"]; [Versionrequest setdelegate:self]; [Versionrequest settimeoutseconds:150]; [Versionrequest addrequestheader:@ "Content-type" value:@ "Application/json"]; [Versionrequest startsynchronous];//response string of our REST callnsstring* jsonresponsestring = [versionrequest Responsestring]; Nsdictionary *loginauthenticationresponse = [jsonresponsestring objectfromjsonstring]; Nsarray *configdata = [Loginauthenticationresponse valueforkey:@ "Results"];for (ID config in configdata) {version = [con] Fig valueforkey:@ "version"];} Check your version with the version in App Storeif (![ Version isequaltostring:[itsuserdefaults objectforkey:@ "Version"]) {Proalertview *createuserresponsealert = [[ Proalertview Alloc] initwithtitle:@ "New version!!" message: @ "A New Version of app is available to download" DeLegate:self cancelbuttontitle:@ "Cancel" Otherbuttontitles: @ "Download", nil]; [Createuserresponsealert show]; [Createuserresponsealert release];}
-(void) Alertview: (Uialertview *) Actionsheet Clickedbuttonatindex: (Nsinteger) Buttonindex { //the user clicked One Of the Ok/cancel buttons if (Buttonindex = = 1) { NSString *ituneslink = @ "itms-apps://phobos.apple.com/ Webobjects/mzstore.woa/wa/viewsoftwareupdate?id=<appid>&mt=8 "; [[UIApplication sharedapplication] Openurl:[nsurl urlwithstring:ituneslink]; }}
The data returned by the request http://itunes.apple.com/lookup?id=954270 is given a version of 2.3, compared to the local client version number to determine whether there is an update.
IOS AppStore Version Upgrade detailed