2011-01-26 4 views
0

응용 프로그램에서 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]; 
+0

이 주제에 대한 일반적인 게시물이 있으므로 놓치지 마세요. http://stackoverflow.com/questions/818973/iphone-how-can-i-include-a-url-to-my -app-in-the-app –

답변

1

이 시도 :

NSURL *appStoreUrl = [NSURL URLWithString:@"http://itunes.apple.com/us/album/esperanza/id321585893"]; 
[[UIApplication sharedApplication] openURL:appStoreUrl]; 
+0

같은 오류가 나타납니다 ... "귀하의 요청을 완료 할 수 없습니다". – Velmurugan

3
NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/album/esperanza/id321585893"]; 
     [[UIApplication sharedApplication] openURL:url]; 

되지 않음을 http : //

+0

죄송합니다, 또한 작동하지 않습니다. \t 같은 오류가 나타납니다 ... "귀하의 요청을 완료 할 수 없습니다". - – Velmurugan

+0

어떻게 될 수 있을까 ?? 당신의 URL이 맞습니까? – xuanweng

+0

해당 URL은 미국 iTunes Store에서만 작동합니다! – Felix

0

다음 코드를 사용할 수 있습니다.

NSURL *url = [NSURL URLWithString:@"itms-apps://itunes.apple.com/us/album/esperanza/id321585893"]; 
[[UIApplication sharedApplication] openURL:url];

하지만 Esperanza 앨범은 미국과 일부 특정 국가에서만 사용할 수 있습니다.

해당 국가에서 사용할 수없는 경우 "요청을 완료하지 못했습니다"라는 오류 메시지이 표시됩니다.

0

아이폰 지원 포보스 링크는 그것은 단지 아이폰에서 작동합니다 아이폰 OS simulator.It에서 작동하지 않습니다이 링크

NSURL *appStoreUrl = [NSURL URLWithString:@"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=321585893&mt=8"]; 
[[UIApplication sharedApplication] openURL:appStoreUrl]; 

아이튠즈 URL을

사용을 엽니 다.

관련 문제