TamperDetector
@MainActor
public class TamperDetector
The main class for detecting tampering on a device. It uses a set of detectors to analyze the device for signs of jailbreaking.
-
The default set of detectors used for tampering analysis.
Declaration
Swift
@MainActor public static var defaultDetectors: [TamperDetectorProtocol] { get } -
The list of detectors to be used for the analysis.
Declaration
Swift
@MainActor public let detectors: [TamperDetectorProtocol] -
Initializes the
TamperDetectorwith a custom set of detectors. If no detectors are provided, the default set is used.Declaration
Swift
@MainActor public init(detectors: [TamperDetectorProtocol] = defaultDetectors)Parameters
detectorsAn array of
TamperDetectorProtocolto be used for the analysis. -
Initializes the
TamperDetectorwith the default detectors plus a custom set of detectors.Declaration
Swift
@MainActor public init(customDetectors: [TamperDetectorProtocol])Parameters
customDetectorsAn array of custom
TamperDetectorProtocolto be added to the default set. -
Analyzes the device for tampering using the configured detectors.
Declaration
Swift
@MainActor public func analyze(forceRunOnSimulator: Bool = false) -> DoubleParameters
forceRunOnSimulatorA boolean to force the analysis to run on a simulator. Defaults to
false.Return Value
A score between 0.0 and 1.0, where 1.0 indicates a high probability of tampering.
View on GitHub