There used to be a method to check if an application was purchased from the App Store, to protect against cracking:
NSBundle *bundle = [NSBundle mainBundle];
NSDictionary *info = [bundle infoDictionary];
if ([info objectForKey: @"SignerIdentity"] != nil)
{ /* do something */ }
but this method no longer works because the crackers have found ways around altering the Info.plist. I’m aware of this older question, but the answers presented there rely on the above technique, which is no longer valid.
How can you detect whether your application was cracked or purchased legitimately from the App Store without reading the SignerIdentity from the Info.plist?
While not a check to see if an Application was purchased from the App Store, I use this code to check to see if my application is running on a jailbroken device: