共享应用程序应用程序快捷方式[UIApplicationShortcutIconTypeShare] [英] Share App application shortcut [UIApplicationShortcutIconTypeShare]

查看:506
本文介绍了共享应用程序应用程序快捷方式[UIApplicationShortcutIconTypeShare]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过很多应用程序使用 UIApplicationShortcutIconTypeShare 应用程序快捷方式直接在主屏幕上分享他们的应用程序。它直接从主屏幕启动UIActivityViewController而无需打开应用程序。你是怎么做到的?

I've seen a lot of apps use the UIApplicationShortcutIconTypeShare application shortcut to share their app right from the home screen. It launches a UIActivityViewController right from the home screen without opening the app. How do you do that?

推荐答案

操作系统将共享菜单项自动添加到所有已下载的应用程序来自App Store。请注意,它不会将其添加到通过Xcode或任何第三方分发系统(如Buddybuild)安装的应用程序。

The OS adds the sharing menu item automatically to all apps downloaded from the App Store. Note that it doesn't add it to apps installed via Xcode or any third party distribution systems such as Buddybuild.

(编辑:您应用的TestFlight版本将具有发送Beta反馈菜单项而不是分享...)

( the TestFlight version of your app will have "Send Beta Feedback" menu item instead of "Share...")

直接解决您的问题,不,这是不可能的(从iOS 10开始 - 可能有可能在未来,谁知道)应用程序直接在主屏幕上呈现视图控制器。如果有可能,这将是一个很大的安全问题,因为应用程序不应该能够访问其自己的主窗口之外的任何内容。

To address your question directly though, no, it is not possible (as of iOS 10 - may be possible in the future, who knows) for an app to present a view controller directly on the home screen. If it was possible, that would be a big security issue, because an app should not be able to access anything outside its own main window.

这篇关于共享应用程序应用程序快捷方式[UIApplicationShortcutIconTypeShare]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆