iOS Jailbreak Detection with Cordova

iOS jailbreaking

Jailbreaking is a form of privilege escalation to grant root access to the iOS file system, allowing addition and modification of apps.

This week saw the release of iOS 8, anyone updating to the latest release will see their devices “un-jailbroken” (locked up, I guess). Although the PanguTeam have released a statement announcing that they are working on an iOS 8 jailbreak.

Unfortunately, there are still 10s of millions of jailbroken iOS devices, so preventing your app from running on a jailbroken device could lead to a limited userbase and/or bad App Store reviews.

Cordova / PhoneGap plugin

There are many reasons why you might not want certain features of your app to run on jailbroken devices, so I have written a handy little plugin to add an extra layer of security, to detect if the device running the app is jailbroken - right from your JavaScript.

I recommend you use this plugin to block certain features in your app rather than prevent it from running entirely.

Add the plugin with the CLI

cordova plugin add

You do not need to reference any JavaScript, the Cordova plugin architecture will add a jailbreakdetection object to your root automatically.



jailbreakdetection.isJailbroken(successCallback, failureCallback);
  • successCallback is called with true if the device is Jailbroken, otherwise false
  • failureCallback is called if there was an error determining if the device is Jailbroken

Further development

Issues and pull requests welcome on the git repo.