checkSecurityStatus method
Runs on-device jailbreak heuristic checks. iOS only — Android root detection is covered by collectAttestationEvidence's server-verified Play Integrity result instead, a stronger signal than any local heuristic could be, so this isn't duplicated there.
Implementation
Future<OneIdSecurityStatus> checkSecurityStatus() async {
if (!Platform.isIOS) {
throw const OneIdConfigurationException(
'checkSecurityStatus() is iOS-only — Android device integrity is '
'verified server-side via collectAttestationEvidence() + Play '
'Integrity instead.',
);
}
final message = await guardPlatformCall(_hostApi.checkJailbreakStatus);
return OneIdSecurityStatus(
isCompromised: message.isCompromised,
checkedAt: DateTime.now(),
details: {'signals': message.signals},
);
}