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?
Share App application shortcut [UIApplicationShortcutIconTypeShare]
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.
Thanks for the explanation. Do you have any references for this automatic behaviour? I've not been able to find this in the documentation. –
Lagena
I've been looking for this for days and yes apparently iOS adds it automatically BUT only if the app is installed from Appstore. But this also means that the app will need to have
UIApplicationShortcutItems
in it's Info.plist
or atleast be targeted for iOS 10 and above (I think). –
Meetinghouse @Annjawn I think this feature was introduced together with iPhone 6's 3D touch, way before iOS 10 –
Pimental
good explanation...I was trying the solution with all random possibilities..now I will stop.. –
Harrar
© 2022 - 2024 — McMap. All rights reserved.