Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Share App application shortcut [UIApplicationShortcutIconTypeShare]

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?

like image 341
Berry Blue Avatar asked Sep 11 '16 21:09

Berry Blue


1 Answers

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.

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

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.

like image 87
mojuba Avatar answered Oct 03 '22 22:10

mojuba