下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。
内存溢出小编现在分享给大家,也给大家做个参考。
Nsstring *version = @""; NSURL *url = [NSURL URLWithString:@"http://itunes.apple.com/lookup?ID=<Your app ID>"]; 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 call Nsstring* JsonResponseString = [versionRequest responseString]; NSDictionary *loginAuthenticationResponse = [JsonResponseString objectFromJsONString]; NSArray *configData = [loginAuthenticationResponse valueForKey:@"results"]; for (ID config in configData) { version = [config valueForKey:@"version"]; } //Check your version with the version in app store if (![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]; }
以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
总结以上是内存溢出为你收集整理的APP版本检测全部内容,希望文章能够帮你解决APP版本检测所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)