I want to open iTunes with a button click from the application to download an iTunes video. What link I should give for this?
Asked
Active
Viewed 84 times
0
-
Not sure if this helps.. but u can have a look at this link: http://stackoverflow.com/a/7316646/942966 – Roshit Sep 11 '12 at 19:03
-
thanks for your comment, but it does not work, it only returns json, i want to open itunes... – Wasif Saood Sep 11 '12 at 19:20
-
and in the JSON there is value for "trackViewUrl". Can that URL help ? Did you check that ? – Roshit Sep 11 '12 at 19:23
2 Answers
1
Apple has a iTunes Link Maker tool that you can use to generate the links
With the link, you can then use
[[UIApplication sharedApplication] openURL:itunesURL];

Marcos Crispino
- 8,018
- 5
- 41
- 59
0
Just use iTunes Link Maker and remove the country code (i.e. "us") out of the link and it would always work open iTunes always and not a browser on the way (if there is iTunes installed on the target system).
Then use the link you got to replace THE_ITUNES_LINK on your code:
[[UIApplication sharedApplication] openURL:THE_ITUNES_LINK];

Jameson
- 76
- 3