IJailbreakRootDetector class abstract
The contract for a service that detects device security vulnerabilities.
Specifies asynchronous checks for jailbreaking (iOS), rooting (Android), emulator usage, app tampering, and more. Concrete implementations provide the platform-specific detection logic. Depend on this interface — not the concrete class — to allow the implementation to be swapped in DI.
class SecurityService {
final IJailbreakRootDetector _detector;
SecurityService(this._detector);
Future<void> performDeviceCheck() async {
if (await _detector.isJailBroken) {
throw Exception('Device is jailbroken or rooted.');
}
if (!await _detector.isRealDevice) {
throw Exception('Application cannot run on an emulator.');
}
}
}
- Implementers
Constructors
Properties
-
checkForIssues
→ Future<
List< JailbreakIssue> > -
A list of specific security issues detected on the device.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isDevMode
→ Future<
bool> -
Whether Developer Mode is enabled on the device.
no setter
-
isJailBroken
→ Future<
bool> -
Whether the device is jailbroken (iOS) or rooted (Android).
no setter
-
isNotTrust
→ Future<
bool> -
Whether the overall device integrity is considered untrusted.
no setter
-
isOnExternalStorage
→ Future<
bool> -
Whether the app is installed on external storage (Android only).
no setter
-
isRealDevice
→ Future<
bool> -
Whether the app is running on a physical device rather than an emulator
or simulator.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isTampered(
String bundleId) → Future< bool> - Whether the application bundle has been tampered with.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited