Skip to content

Freemium SDK configuration

Classes and methods overview

The following classes, structures, and methods are available in RASPPortalSDK:

  • RASPFacade
  • TamperingNotificationDelegate
  • DetectionType
  • RASPConfig

RASPFacade

RASPFacade class is the main class of App Protector SDK. This class is used to trigger tampering detection.

Detect on demand

This method is used for a single on demand App Protector detection. The method expects one input parameter, i.e. raspConfiguration which represents types of tampering that will be detected by the App Protector SDK in the single on demand tampering detection request. The method will return detected tampering, or empty Array if no tampering is detected.

public static func doDetectOnDemand(raspConfiguration: [raspConfig]) -> [DetectionTamperingType]
  • raspConfiguration – array which specifies which tampering will the App Protector SDK try to detect. RaspConfig type is explained in sec. TamperingNotificationDelegate.

TamperingNotificationDelegate

TamperingNotificationDelegate is a public protocol with onTamperingDetected method.

public protocol TamperingNotificationDelegate { 
    func onTamperingDoDetect(detectedTampering: [DetectionTamperingType]) -> Void
} 
  • detectedTampering – one or more possible cases with paid version, free version supports only Jailbreak detection

DetectionType

internal struct DetectionType: OptionSet {

    let rawValue: Int

    static let None = DetectionType(rawValue: 0)

    static let JailbreakWithNotification = DetectionType(rawValue: 1 << 1)
}

RaspConfig

public struct RaspConfig: OptionSet {

    public let rawValue: Int

    public init(rawValue: Int) {
        self.rawValue = rawValue
    }

    public static let None = RaspConfig(rawValue: 0)

    public static let JailbreakNotifyUser = RaspConfig(rawValue: 1 << 1)
}