Identify jailbroken device from iOS application [duplicate]
Asked Answered
V

1

0

I am developing an iPhone application which is used for business purposes and it is storing many number of records in SQlite database. So my client don't want the app to run on the jailbroken devices.

So how to identify the jail broken devices during the app launch and preventing the user from proceeding further by showing some message.

Thanks in advance.

Vanwinkle answered 18/4, 2013 at 12:45 Comment(2)
#6530864Kerrikerrie
Thanks, I will make a try...Vanwinkle
A
5

You can detect through code that if the app is running on a jail broken device or not.
Through that way you can pop up a alert and close the app.
You can do whatever you want to do.

Here is a tutorial for it.

Detection

NSString *filePath = @"/Applications/Cydia.app";
if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
{
   // do something useful
}

Also if you want complete solution you can see in tapjoy sdk code.

They are detecting jailbroken iphone.

Here is tapjoy URL tapjoy

Arrears answered 18/4, 2013 at 13:5 Comment(6)
Thanks for immediate response and i will try this...Vanwinkle
Grt Tarun..+1 for nice ansAilsa
Good answer but incomplete. This code will check if Cydia application is installed on the device, so yes, if Cydia is installed it's mean the device is jailbroken but the opposite is not true : It's not because Cydia is not installed that the device is not jailbroken. A device can be jailbroken without Cydia being installed.Towrey
Hi Ashbay, that's fine. Any other suggestions on how to detect jailbroken devices in all the scenario?Vanwinkle
And this method won't work if user install some jb-hide plugin such as Xcon.Shanon
Don't use fileExistsAtPath only, try more c methods such as stat. It will cost more effort to hook the output.Shanon

© 2022 - 2024 — McMap. All rights reserved.