Search code examples
iosobjective-cios8-extensionios8-today-widget

iOS Today Widget - Determine if active


  1. Can the container app determine if embedded today widget is active or not ? (active = the user add the widget in notification center)

  2. There is a way to force activate the embedded today widget ? When user first install the app or update it, can the embedded today widget be active by default ?


Solution

  • 1: yes you can using AppGroups. Using that you can pass data between the extension and the container app. In your case that would be isInstalled=YES. A different problem checking if it's removed.

    Simple as NSUserDefaults. Plus you need to setup your project capabilities for that.

    2: no