Detect ios app is running on JailBreak Device in Swift (workaround)
Apple said:
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.
If still, you want to detect there is some workaround
There are ways to check the JailBreak device in swift
- Check if Cydia App is installed on the iOS device
- check some systems-generated Files when we installed Cydia.
- Try to write in System Files