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];
NS
The official Apple's answer:
Hello Dmitry,
Thank you for contacting Apple Developer Technical Support (DTS).
DTS does not provide code-level support for DRM issues.
Please try posting your inquiry to Apple Development Forum:
While you were initially charged a Technical Support Incident (TSI) for this request, we have assigned a replacement TSI back to your account.
Thank you for understanding our support policies.
Best Regards,
Apple Developer Support
Worldwide Developer Relations