A WidgetViewController instance represents a view controller that handles widgets for the EngagementSDK.

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

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

If the WidgetViewController 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

  • Set the Theme for the WidgetViewController


    A theme can be applied at any time and will update the view immediately

  • Pauses the WidgetViewController. All future widgets will be discared until resume() is called. Any currently displayed widgets will be immediately dismissed.

  • Resumes the WidgetViewController. All future widgets will be received and rendered normally.