2011년 10월 20일 목요일

아이폰 iOS 실행 중인 앱에서 다른 앱(또는 팟캐스트)의 앱스토어 다운로드 화면 열기


이따금 내 앱에서 다른 앱의 다운로드 화면을 열어서 해당 앱을 추천하고 싶을 수 있습니다.
Sometimes you could want to open the other app's download screen in your iOS app.

애플 앱스토어의 앱으로 연결하고 싶으면 아래 링크에 아이디를 더하면 되고요.
If you want to open the app store's app info screen, add id string at the end of below link.

itms-apps://itunes.apple.com/kr/app/id[idString]

아이튠즈의 팟캐스트 화면으로 연결하고 싶으면 아래 링크에 아이디를 더하면 됩니다.
If you want to open the iTunes store's podcast info screen, add id string at the end of below link.

http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=[idString]

링크를 정하면 이 코드로 열면 됩니다.
After deciding the link, open the screen using this code.

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];

아이디는 아이튠즈에서 해당 앱이나 팟캐스트의 이름을 우클릭해서 [링크 복사]로 얻을 수 있습니다.
You can get the id string by right-clicking the title name(select [Copy link]) at the detail page of iTunes store or app store.

출처 : http://weblab.tistory.com/trackback/455

댓글 없음:

댓글 쓰기