4

I am working on a project, in which I have included consumable In-App purchase. Now on jailbroken device, user can make fake in-app purchase. I have already included Receipt Verification code

How to prevent it ? Is there anything I am missing here ? Is it possible to check a device is jailbroken or not ?

SandeepM
  • 2,601
  • 1
  • 22
  • 32
  • refer http://stackoverflow.com/questions/413242/how-do-i-detect-that-an-sdk-app-is-running-on-a-jailbroken-phone – Maulik Jul 25 '13 at 05:42

1 Answers1

2

is possible know if your app are running in a jailbroken device, most of all jailbroken devices have an app called Cydia, you can check if this app exist:

+(BOOL)isJailbroken {
NSURL* url = [NSURL URLWithString:@"cydia://package/com.example.package"];
return [[UIApplication sharedApplication] canOpenURL:url];
}

Cydia has a URL scheme cydia:// which can be legally checked with UIApplication canOpenURL:

busta117
  • 526
  • 4
  • 8
  • 3
    This is not a definitive way. It is *pretty good* but not perfect. Furthermore, just because a device is jailbroken does not mean that the user is malicious. That is a more dangerous assumption. – borrrden Jul 25 '13 at 05:43
  • Note that not all users have Cydia installed -- this is not a good check, and you should rather check for something like /bin/bash that /all/ users /will/ have. – Manthan Aug 02 '13 at 11:30