I want to use that anti piracy code for my app.
NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/_CodeSignature", bundlePath)];
if (!fileExists) {
//Pirated
NSLog(@"Pirated");
}
BOOL fileExists2 = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/CodeResources", bundlePath)];
if (!fileExists2) {
//Pirated
NSLog(@"Pirated2");
}
BOOL fileExists3 = [[NSFileManager defaultManager] fileExistsAtPath:(@"%@/ResourceRules.plist", bundlePath)];
if (!fileExists3) {
//Pirated
NSLog(@"Pirated3");
}
Has anyone used it before? Can it be used for some basic protection, or is it just crap? What suggestions do you have on this topic?
Users don't have to “jailbreak”: an iOS device to pirate games. Some apps for the PC and Mac enable users to install pirated games onto their iPhone or iPad, even with the latest versions of iOS.
Copyright infringements can be punishable by up to five years in prison and $250,000 in fines. Repeat offenders can be imprisoned for up to 10 years. Violators can also be held civilly liable for actual damages, lost profits or statutory damages up to $150,000 per work.
My two cents is that I think you are going to spend a lot of time trying to stop something that you cannot fully stop. From what is said in some of the comments it sounds like you are concerned about piracy because there are a lot of jailbroken phones in Greece. Greece is just one part of the world and I suspect if you stop thinking locally and start thinking globally you will find that the majority of phones are not jailbroken and are running legit apps.
My suggestion would be to concentrate on those customers who will pay. Spend your time making your app so appealing that they will jump at the chance to buy it.
Second, I would suggest that you look for ways to endear the jailbreakers so that they like your app and want to give you money or buy it. There is a lot of discussion on the net about new business models and how the older piracy hating models are just not working. Hunt around and I think you will find cases where people have embraced the fact that their product is being copied and used it to their advantage. Can you pull off the same trick? If you can, then concerns about piracy will disappear and the people concerned will quite likely become an asset rather than a liability.
Just my thoughts :-)
It's better than nothing. Note that it can be very easily worked around by just creating empty files with the corresponding names. And figuring out said filenames is easy, someone could just use strings
on your binary.
I've used this code in apps before, but I don't stop the pirate from using my app. I just have a message displayed to try and guilt the user into purchasing the app.
If you really want to prevent pirates from using your app you should check the encryption of your app binary. Like this: http://landonf.bikemonkey.org/2009/02/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With