• Extensions have a separate code signature, entitlements, and container from their parent app.
  • They are not a form of app to app IPC and are accessed solely by Apple frameworks (not even Apple’s apps access them directly)

Notification Center Widgets

  • Widgets are view controllers — all of the same lifecycle and containment concepts apply.
    • Widget should be ready to display after -viewWillAppear:.
  • Notification Center sets the view frame.
    • Height can be set using Autolayout constraints or by setting UIViewController’s preferredContentSize.
    • Content should animate alongside the height change.
      • On iOS, implement -viewWillTransitionToSize:withTransitionCoordinator: and call -animateAlongsideTransition:completion: from the UIViewControllerTransitionCoordinator protocol.
      • On OS X, implement -viewWillTransitionToSize:.
  • Implement -widgetPerformUpdateWithCompletionHandler: from the NCWidgetProviding protocol to be notified when to update the widget.
  • New “Today Extension” Xcode template on both iOS and OS X for adding a widget target.
  • Use UIViewController’s extensionContext (see NSExtensionContext) to call back to the main app from the widget.

Share Extensions


Complete documentation can be found in the App Extension Programming Guide.