通过APPID从appStore获取应用最新信息

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    
    int appid = 414478124;
    NSURLRequest *request = [NSURLRequest requestWithURL:URL(@"http://itunes.apple.com/lookup?id=%d",appid)];
    NSURLConnection *Connection = [[NSURLConnection alloc]initWithRequest:request delegate:self];
    
    
    self.window.backgroundColor = [UIColor whiteColor];
    [self.window makeKeyAndVisible];
    return YES;
}


- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response{
    self.receiveData = [NSMutableData data];

}

- (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
    [self.receiveData appendData:data];

}

- (void)connectionDidFinishLoading:(NSURLConnection *)connection{
    NSString *receiveStr = [[NSString alloc]initWithData:self.receiveData encoding:NSUTF8StringEncoding];
    NSLog(@"%@",receiveStr);
}
- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error{
    
    
}

通过APPID从appStore获取应用最新信息,布布扣,bubuko.com

通过APPID从appStore获取应用最新信息

上一篇:Android系统亮屏、锁屏、屏幕解锁事件(解决部分手机亮屏后未解锁即进入resume状态)


下一篇:android中播放gif动画