My friend got a jailbroken iPad. When he installed Business Model Generation App from Installous and tried to use it, the application showed a UIAlertView
with the following message:
Does anybody know how to do that?
I have 2 ideas:
flag = NO
, you show the UIAlertView
.Am I right? How can I implement this feature?
You can detect two files: SC_Info
and iTunesMetadata.plist
.
If you can't find them, then your app was pirated: these files are installed after downloading from the App Store.
This is the code to check:
NSString * bundlePath = [ [NSBundle mainBundle] bundlePath ];
if ( ! [ [NSFileManager defaultManager] fileExistsAtPath: ( @"%@/SC_Info", bundlePath ) ] )
{
// jailbroken
}
if ( ! [ [NSFileManager defaultManager] fileExistsAtPath: ( @"%@/iTunesMetadata.plist", bundlePath ) ] )
{
// jailbroken
}