MoEngageInAppUtils

extension MoEngageInAppUtils

InApp utility extension

  • Declaration

    Swift

    @objc
    public static func mapNavigationType(from type: MoEngageInAppWidgetNavigationType) -> MoEngageNavigationType
  • Declaration

    Swift

    @objc
    public static func isAppEnabledForInstance(_ sdkInstance: MoEngageSDKInstance) -> Bool
  • Declaration

    Swift

    @objc
    public static func isInAppEnabledForInstance(_ sdkInstance: MoEngageSDKInstance) -> Bool
  • Declaration

    Swift

    @objc
    public static func isInAppStatsEnabledForInstance(_ sdkInstance: MoEngageSDKInstance) -> Bool
  • Declaration

    Swift

    @objc
    public static func getSupportedOrientationType(_ supportedOrientation: [String]) -> MoEngageInAppOrientationType
  • Parse JSON data to dictionary for error response handling

    Declaration

    Swift

    @objc
    public static func parseDictionary(from data: Data?) -> [AnyHashable : Any]?

    Parameters

    data

    The JSON data to parse

    Return Value

    Parsed dictionary if successful, nil otherwise

  • Creates a UIColor from an RGBA dictionary

    Declaration

    Swift

    @objc
    public static func getColor(fromRGBA rgbaDict: [AnyHashable : Any]?) -> UIColor?

    Parameters

    rgbaDict

    Dictionary containing “r”, “g”, “b”, “a” keys with numeric values

    Return Value

    UIColor instance if dictionary is valid, nil otherwise