views:

38

answers:

1

I am trying to create a button in my app to take users to another app in the iTunes store. I am just using NSURL and I have copied the link from iTunes replacing the 'itunes' part to 'phobos'. When I click the button it opens the app store but I get an error saying "cannot connect to itunes store". I can connect if I just go to the app store on my phone so I guess this means I am doing something wrong in my app rather than there actually being a connection problem. Any ideas?

This is my code

NSString *iTunesLink = @"itms://phobos.apple.com/gb/app/pastatime/id335197364?mt=8";
        [[UIApplication sharedApplication]
         openURL:[NSURL URLWithString:iTunesLink]
         ];

This is the link I copy from iTunes http://itunes.apple.com/gb/app/pastatime/id335197364?mt=8

A: 

Use the itms:// protocol handler.

Graham Lee
That didn't help. I am trying to connect to the UK store does that make a difference? This is the link I copy from iTunes itunes.apple.com/gb/app/pastatime/id335197364?mt=8 and this is what I have changed it to itms://phobos.apple.com/gb/app/pastatime/id335197364?mt=8 Any more ideas?