6

My App is supported Today Extension,

I want to add a button to my app's settings view, so when the user clicks on it I switch the user to "Add Widget" view, i.e this view:

enter image description here

so the user can add the desired widget.

Is there a way to do that? or it's not possible?

Thanks.

Rawan
  • 1,589
  • 4
  • 23
  • 47

3 Answers3

5

This is not possible. The only thing you can do is to tell your users about the widget and possibly how they can add a widget to the today view:

  • Goto home screen
  • swipe all to the left
  • scroll to the bottom
  • tap "Edit"
  • tap "+" next to my super useful widget.
D. Mika
  • 2,577
  • 1
  • 13
  • 29
  • 1
    Hello, Thanks for the answer, but a question please: is there a reference from Apple document that says that's not possible to do that? and thank you for the lovely suggestion :) – Rawan Oct 22 '17 at 10:00
  • 1
    Well, usually apple only says what's possible and allowed. But there's no API for such task, so that's why I said it's no possible. – D. Mika Oct 22 '17 at 10:15
1

It seems there is no API to display Widgets Edit Screen, because: Normally there is an "Add Widget" button in app's setting view by default (if widget is not installed yet). So you don't need to open widgets edit screen. Here is screenshot.

enter image description here

John Eugene
  • 101
  • 1
  • 2
-1

Just swipe down to open notification center and add your widget as shown in below sample.

Sample

Community
  • 1
  • 1
Usman
  • 457
  • 4
  • 8
  • 1
    I mean how to do that "programmatically" :| :| :| :| @_@ – Rawan Oct 23 '17 at 07:13
  • You have to manually add widgets to your widget list because for now apple never provide any public api to do this thing. – Usman Oct 24 '17 at 20:45