如何从我的应用程序启动应用商店(How can I launch app store from my application)

编程入门 行业动态 更新时间:2024-10-23 21:28:40
如何从我的应用程序启动应用商店(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.

更多推荐

本文发布于:2023-08-05 00:31:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1424595.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   商店   launch   application   store

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!