如何从我的应用程序启动应用商店(How can I launch app store from my application)
我试图实现从我的应用程序打开应用商店应用程序的按钮。 我使用这个简单的代码行,打开safari但不打开app store应用程序。
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://itunes.apple.com/sk/app/tweetie-2/id333903271?mt=8"]];我不知道什么是错的,URL格式是否正确? 我正在关注这份文件 。
我认为stackoverflow中的所有相关问题都是过时的。
Im trying to implement button which opens app store application from my app. I use this simple line of code, which opens safari but not app store application.
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://itunes.apple.com/sk/app/tweetie-2/id333903271?mt=8"]];I dont know whats wrong, is the URL format correct? I was following this document.
All related questions in stackoverflow are outofdate I suppose.
最满意答案
如果您想绕过Safari,请将URL中的“itunes”更改为“phobos”。 请注意,这在模拟器中会失败,但绝对可以在设备上运行。
If you want to bypass Safari, change 'itunes' in the URL to 'phobos'. Note that this will fail in the simulator, but most definitely works on the device.
更多推荐
发布评论