Can you hide app widgets from appearing under the 3D touch quick actions?
Asked Answered
N

3

13

I'd like to remove my apps Today Widget from appearing when 3D touching the app icon on the home screen because showing the quick actions and the Today Widget just doubles up the actions app provides (seen in screenshot). Is there anyway to hide widgets from the 3D touch quick actions using the Info.plist or some other method?

Thanks

3D touch quick actions and widgets screenshot

Nasia answered 23/9, 2016 at 12:58 Comment(0)
R
6

So, if you have multiple homescreen widgets, you can set UIApplicationShortcutWidget to determine which one should be shown. I haven't been able to find a way to disable them altogether from appearing in the 3d touch shortcut menu.

One option you may be able to try (this works for me on the simulator) is to set this value in your Info.plist to the value of nil.

<key>UIApplicationShortcutWidget</key>
<string>nil</string>

Your other option is to create a different widget, with more useful functionality, perhaps such as showing the currently running timer, or other stats.

Rosenblatt answered 21/10, 2016 at 14:34 Comment(4)
Hi Nick, would you please confirm that after adding above key in your plist. Your application got approval or not? Because, other answer saying that, Apple may reject the app because of this. I am having the exact issue for the app.Writeoff
My widget isn't ready for release, so it isn't part of my release build yet. From using this method in development though, I've become much more confident in the result.Rosenblatt
@Hermang I can confirm that my app was declined (during the automated checks while submitting archive to iTunes Connect) for using nil value as UIApplicationShortcutWidget. Any other ideas? Image: imgur.com/a/x8AGUSholem
Mark this as the accepted answer. Works for me on a device too.Ashien
S
2

Apple released this has a new feature, where user can see the handy information when force touching the App icon for shortcut items. I presume we cannot remove widget during 3D touch quick actions.

Speciation answered 21/10, 2016 at 7:55 Comment(1)
Could you check other answers? Also, please share your experience if you tried this before.Writeoff
P
2

Unfortunately, there's now way to hide app widget. If you set UIApplicationShortcutWidget to nil, your app will get rejected.

Pearman answered 27/10, 2016 at 5:5 Comment(7)
Hi Adam, would you please confirm that after adding above key in your plist. Your application got approval or not? Because, other answer suggesting to do this stuff. I am in need of releasing my application.Writeoff
I haven't tried that myself... someone else confirmed that to mePearman
Thanks for the quick response. If you have some guideline links or anything which can prove this. Also, FYI, I could see 2-3 apps which has done the exact things and they are live on AppStore.Writeoff
They did? Are you sure they have been updated for iOS 10? It works for old releases... Anyway I recommend you try it, review time is quit fast nowadays...Pearman
Oh yes, agree. Yes, they have done it for iOS 10 as well. Though I am thinking to give a try on the same. ThanksWriteoff
Please post here with resultPearman
@Hermang It was declined. See my comment under Nick's answer.Sholem

© 2022 - 2024 — McMap. All rights reserved.