I have exactly same problem in
iTunes lookup API return old data in my APP
API: https://itunes.apple.com/kr/lookup?bundleId=com.xxx.xxxx
if I request through browser it returns new version but when I check it in my APP, it returns old version.
someone said that it could be CDN issue but when I updated APP before, it returned new version.
- (NSString *)appVersionInfo{NSString *appVersion = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
return appVersion;}
- (BOOL)compareSameAppVersion{
NSString *thisAppVersion = [self appVersionInfo];
NSString *currentAppVersion = nil;
NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary];
NSString *appId = infoDic[@"CFBundleIdentifier"];
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:URL_APP_STORE_APTNER_BUNDLE, appId]];
NSLog(@"%@",url);
NSData *data = [NSData dataWithContentsOfURL:url];
NSDictionary *lookup = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
if([lookup[@"resultCount"] integerValue] == 1){
currentAppVersion = lookup[@"results"][0][@"version"];
NSLog(@"AppStoreVersion : %@, thisAppVersion : %@", currentAppVersion, thisAppVersion);
if([currentAppVersion isEqualToString:thisAppVersion]){
NSLog(@"AppStoreVersion : %@, thisAppVersion : %@", currentAppVersion, thisAppVersion);
return YES;
}
}else{
return NO;
}
return NO;
}
the result is
AppStoreVersion : 1.0.5(which is old) thisAppVersion : 1.0.6(which is new and updated in app store already)
Anyone help?