Other Classes

The following classes are available globally.

  • Represents a UTC time

    Implements NSCoding for easy conversion to Data using NSKeyedArchiver/NSKeyedUnarchiver. This is helpful if you need to store in persistent storage like UserDefaults.

    See more
  • Example class that conforms to GIFAnimatable. Uses default values for the animator frame buffer count and resize behavior. You can either use it directly in your code or use it as a blueprint for your own subclass.

    See more
  • The entry point for all interaction with the EngagementSDK.

    Important

    Concurrent instances of the EngagementSDK is not supported; Only one instance should exist at any time.
    See more
  • The PassthroughView is a UIView that is able to pass user interactions into the UIView below it in a multilayered UIView scenario.

    See more
  • A presentation mode for Widgets

    Widgets in this mode will appear in a vertical list sorted by the time the Widget is created (descending).

    Default widgets in this mode are indefinitely interactive with a few exceptions. Quiz and Image Slider widgets will become non-interactive after the user has locked in their vote. Prediction Widgets will become non-interactive after the Prediction Follow Up has been published.

    You can configure which and how widgets are displayed by overriding:

    • didLoadInitialWidgets
    • didLoadMoreWidgets
    • didReceiveNewWidget
    • makeWidget
    See more
  • A WidgetPopupViewController instance represents a view controller that handles widgets for the EngagementSDK.

    Once an instance of WidgetPopupViewController has been created, a ContentSession object needs to be set to link the WidgetPopupViewController with the program/CMS. The ‘ContentSession’ can be changed at any time.

    The WidgetPopupViewController can be presented as-is or placed inside a UIView as a child UIViewController. See Apple Documentation for more information.

    If the WidgetPopupViewController is placed inside another view, please take note of the minimum size restrictions. This restriction can be ignored by setting ignoreSizeRestrictions.

    Also, an extension was included for convenience to help add a view controller inside of a specificied view. Please see UIViewController.addChild(viewController:view:) for more information

    See more
  • A presentation mode for Widgets

    Widgets in this mode will appear in a vertical list sorted by the time the Widget is created (descending).

    On load, published widgets will be loaded from history and, by default, display results, and be non-interactive. New widgets will appear at the top of the list and be interactive until the timer expires.

    You can configure which and how widgets are displayed by overriding:

    • didLoadInitialWidgets
    • didLoadMoreWidgets
    • didReceiveNewWidget
    • makeWidget
    See more