-->

Identify jailbroken device from iOS application [d

2019-04-16 22:07发布

问题:

This question already has an answer here:

  • How to detect that the app is running on a jailbroken device? [duplicate] 11 answers

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.

回答1:

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