//request the Apple Store to view the version number of the store online version[[[Nsurlsession sharedsession] Datataskwithurl:[nsurl urlwithstring:@"http://itunes.apple.com/lookup?id=328266349"] completionhandler:^ (NSData * _nullable data, Nsurlresponse * _nullable response, Nserror *_nullable Error) { if(!error) {Nsdictionary*responseobject =[nsjsonserialization jsonobjectwithdata:data options:nsjsonreadingallowfragments Error:nil]; if(Responseobject.count >0) {Nsarray*array = responseobject[@"Results"]; Nsdictionary*dict =[Array lastobject]; NSString*versionstring = [Dict objectforkey:@"version"]; //nsstring* version =[[[nsbundle Mainbundle] infodictionary] Objectforkey:@"cfbundleshortversionstring"]; //Nscomparisonresult result =[version compare:versionstring Options:nsnumericsearch]; if(Result = = Nsorderedascending | | result = =nsorderedsame) { //}}}}]resume];
Request the Apple Store to view the version number of the store online version