我需要從我的應用程序打開iTunes應用程序商店。我使用了以下鏈接。但是,錯誤的是:從iPhone應用程序打開iTunes
您的請求無法完成
我的代碼如下:
NSString *referralLink = @"http://itunes.apple.com/us/album/esperanza/id321585893";
NSURL *iTunesURL = [NSURL URLWithString:referralLink];
NSURLRequest *referralRequest = [NSURLRequest requestWithURL:iTunesURL];
NSURLConnection *referralConnection = [[NSURLConnection alloc] initWithRequest:referralRequest delegate:self startImmediately:YES];
[referralConnection release];
[[UIApplication sharedApplication] openURL:iTunesURL];
在這個主題上有一個經典的帖子,所以你不能錯過它,http://stackoverflow.com/questions/818973/iphone-how-can-i-include-a-url-to-my -app-in-the-app – 2011-01-26 09:41:14