Search code examples
iosituneshyperlink

iPhone application not connecting to iTunes store


I am implementing an application that launches iTunes from a 'music page'.

This is the link generated by link maker:

http://itunes.apple.com/us/album/como-tu-mujer/id392755037?i=392755131&uo=4

And this is the code I use in my application to launch iTunes:

NSString *iTunesLink = @"http://phobos.apple.com/us/album/como-tu-mujer/id392755037";  
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];

But while testing I get this error:

Cannot connect to iTunes Store

Am I using the wrong path? I have found that I have to use the phobos ... in the link I tried different variations for the path, but it's still not working ...

Hot can I fix this??

Thanks a lot!


Solution

  • please disregard the question!

    the problem was the phobos!! it is used only for apps, not music

    so leaving the link as generated by the link maker is ok!

      NSString *iTunesLink = @"http://itunes.apple.com/us/album/como-tu-mujer/id392755037";