开发者

Link from my app to iTunes - connection error?

开发者 https://www.devze.com 2023-01-16 16:47 出处:网络
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\'. Whe

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 URLWithS开发者_运维知识库tring:iTunesLink]
         ];

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


Use the itms:// protocol handler.

0

精彩评论

暂无评论...
验证码 换一张
取 消