Class WidgetKit


  • public final class WidgetKit
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String NSUserActivityTypeLiveActivity()
      A string that the system passes to the app on launch from a Live Activity that doesn't provide a URL.
      static java.lang.String WGWidgetUserInfoKeyActivityID()
      A key you use to access the activity ID if the widget represents a Live Activity.
      static java.lang.String WGWidgetUserInfoKeyFamily()
      A key you use to access the widget's family.
      static java.lang.String WGWidgetUserInfoKeyKind()
      A key you use to access the widget's kind.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • WGWidgetUserInfoKeyKind

        public static java.lang.String WGWidgetUserInfoKeyKind()
        A key you use to access the widget's kind. The value matches the `kind` property specified in the widget’s configuration.
      • WGWidgetUserInfoKeyFamily

        public static java.lang.String WGWidgetUserInfoKeyFamily()
        A key you use to access the widget's family.
      • WGWidgetUserInfoKeyActivityID

        public static java.lang.String WGWidgetUserInfoKeyActivityID()
        A key you use to access the activity ID if the widget represents a Live Activity.
      • NSUserActivityTypeLiveActivity

        public static java.lang.String NSUserActivityTypeLiveActivity()
        A string that the system passes to the app on launch from a Live Activity that doesn't provide a URL. In many cases, you use to allow users to tap a Live Activity and open a screen in the app with functionality that best fits the Live Activity. If you don't use the `widgetURL(_:)` modifier to provide a URL, the system launches your app and passes `NSUserActivityTypeLiveActivity` as the of upon launch. Check for this value on launch to open a screen in your app that fits the context of the active Live Activity.