Disable iOS 10 Quick Actions Widget
Asked Answered
Q

1

6

In my app, I have a standard widget that comes with it. When I build with iOS 10, the widget is automatically included in the 3D Touch Quick Actions menu. This widget kind of duplicates the features of the Quick Actions that are already there. I would like to be able to hide this widget and only have the quick actions, but I cannot seem to be able to do that.

I tried using the plist value for the UIApplicationShortcutWidget and setting it to empty, but that doesn't work as the default widget then appears. I also tried setting it to an invalid value such as 'null' which then prevents a widget from appearing, but then the App Store rejects my app bundle with the following error.

Error 1: ​ITMS-90640​ - Invalid Info.plist value
Invalid Info.plist value. The value for key UIApplicationShortcutWidget must be the bundle identifier of a Today extension in the app.

Does anyone know of a workaround for this?

Qp answered 18/9, 2016 at 13:50 Comment(0)
B
2

In my case adding the Key Home Screen Widget of type String with the value nil to the plist removed the automatically loaded widget. As XML it looks like:

<key>UIApplicationShortcutWidget</key>
<string>nil</string>
Bash answered 1/10, 2016 at 22:30 Comment(5)
Were you able to upload your app to the App Store and get it approved with this change?Qp
This does not answer the question.Damocles
@Qp have you tried this? did it got approved?Cruse
@AdamBardon This was the initial approach I tried before posting here, and it got automatically rejected when I used <string>null</string> so I'm guessing they do automatic checking if this is a valid key. I opened a bug about this and Apple responded "You should design your widgets with the expectation that they can be visible in the home screen 3D Touch view." I'm guessing that they don't care about this.Qp
@Qp Interesting. Thank you! You saved me a lot time from repeating the same process.Cruse

© 2022 - 2024 — McMap. All rights reserved.