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
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
jailbreakdetection object to your root automatically.
successCallbackis called with true if the device is Jailbroken, otherwise false
failureCallbackis called if there was an error determining if the device is Jailbroken
Issues and pull requests welcome on the git repo.