Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is this iOS anti-piracy code any good? [closed]

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?

like image 768
Mpampinos Holmens Avatar asked Feb 20 '12 22:02

Mpampinos Holmens


People also ask

Is piracy possible in iOS?

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.

What are the consequences of piracy?

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.


3 Answers

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 :-)

like image 188
drekka Avatar answered Nov 14 '22 10:11

drekka


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.

like image 3
Ecco Avatar answered Nov 14 '22 09:11

Ecco


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

like image 3
edc1591 Avatar answered Nov 14 '22 08:11

edc1591