MoEngageInAppUtils

extension MoEngageInAppUtils

InApp utility extension

  • Declaration

    Swift

    @objc
    public static func getStringRepresentation(for sdkCampaignType: MoEngageInAppSDKCampaignType) -> String
  • 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 getTemplateType(for templateStr: String?) -> MoEngageInAppTemplateType
  • Converts a string representation of in-app type to MoEngageInAppType enum

    Declaration

    Swift

    @objc
    public static func getInAppType(_ inAppTypeStr: String?) -> MoEngageInAppType

    Parameters

    inAppTypeStr

    String representation of the in-app type

    Return Value

    MoEngageInAppType enum value

  • Declaration

    Swift

    @objc
    public static func getSupportedOrientationType(_ supportedOrientation: [String]) -> MoEngageInAppOrientationType
  • Declaration

    Swift

    @objc
    public static func getCampaignType(_ templateType: MoEngageInAppTemplateType) -> MoEngageInAppSDKCampaignType
  • 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