There’s no supported way to detect jailbroken phones.
My recommendation here is that you not attempt to do this because:
unsupported techniques are… well… unsupported
such techniques can cause problems with App Review
such techniques tend to be brittle, that is, they break as the OS evolves; this causes two problems:
- false positives
- crashes, or other failures
both of which annoy your legitimate users
it puts you into an arms race with your attackers; if lots of apps use a specific check, the attackers will patch that check
It is better, IMO, to spend your time adding features that help you legitimate users.
Oh, one last thing: as jailbreak detection is not supported, it’s not an appropriate topic for DevForums. I’m happy to discuss it in general terms but let’s not stray into the specific technicalities, eh?
Share and Enjoy
Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"