cordova-plugin-ra-securitychecks
v1.0.1
Published
RASP-style checks and fresh location simulation detection for iOS (Cordova)
Maintainers
Readme
cordova-plugin-securitychecks
RASP-style security checks + fresh simulated location detection for iOS.
Install
cordova plugin add cordova-plugin-ra-securitychecks
# or from a VCS/url if you host it somewhereiOS only. Requires Xcode 13+ for iOS 15 APIs (for
CLSourceInformation).
Usage
// Best practice: get fresh location (async) before resolving
SecurityChecks.getStatus(function (res) {
console.log('Security status:', res);
/*
{
isDebuggerAttached: boolean,
isJailbroken: boolean,
isSimulator: boolean,
integrityPassed: boolean,
hookingDetected: boolean,
hasEmbeddedMobileProvision: boolean,
isLocationSimulated: boolean // fresh reading with cache-avoidance
}
*/
}, function (err) {
console.error(err);
});
// Quick snapshot (returns immediately; location may be cached)
SecurityChecks.quickStatus(function (res) {
console.log('Quick status:', res);
}, console.error);Info.plist
The plugin injects these automatically:
NSLocationWhenInUseUsageDescriptionNSLocationAlwaysAndWhenInUseUsageDescription
Customize the messages after first build if desired.
Notes
- There is no public API to clear CoreLocation cache. The plugin avoids stale reads by requesting a fresh one-shot location and ignoring results older than 2 seconds.
- On iOS < 15,
isLocationSimulatedwill always befalsebecauseCLSourceInformationis unavailable. - Some jailbreak checks may be sensitive for App Store review; use with caution.
