NSString *version = @""; NSURL *url = [NSURL URLWithString:@"http://www.51sjk.com/Upload/Articles/1/0/323/323233_20220817162716895.jpg 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]; }
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....