views:

307

answers:

1

As par my app requirement, there is a couple of scenarios that I need to handle.

Scenario 1: To avoid piracy, I want to include some piece of code, whose job is sending both IMEI and Serial number of IPhone.

Scenario 2: At server side, I've a database, which has a list of both IMEI and Serial No info. Here I wanna validate both IMEI and Serial numbers. If both are not matched then I can make sure that the app is pirated.

Idea seems good. But I don't know how to handle these two scenarios in my app.

Any help is greatly appreciated.

+3  A: 

This isn't something you can do with the iPhone SDK. The iPhone's IMEI or the serial number are not accessible via any API. Also an iPod Touch doesn't even have an IMEI.

Your idea is flawed too. How would you have gotten the IMEI and serial number into your servers database prior to app sending you the details? You can't get these details during purchase because its handled by the App Store and you can't get at that.

If the app was pirated, it would send you the IMEI and serial number anyway, so you can't rely on the app sending them the first time it's run because that would offer absolutely no protection against piracy at all.

The only option you have is to rely on Apple's fairplay DRM. Even though it has been cracked, and there are pirates, it's something you just need to deal with...

Jasarien
I would add that piracy simply isn't a major problem on the iPhone. (1) Only a small number of apps are expensive enough to induce people to steal them. (2) Only a small number of users have the technical skills to do so and (3) only a small number of uses are willing to take the risk that a cracked app isn't malicious (4) only a small number of users use jailbroken phones. You'll lose more money wasting resources trying to prevent piracy than you will recoup by preventing it. It's not cost effective.
TechZen
@Jasarien, IMEI or something else (UDID) which is unique. Forget about the other details. Just I need to call a script with UDID/IMEI as a param. Then this script needs to compare UDID on the stored values (which are in a DB) and return a value. This is the total idea.
prathumca
That's all well and good, but what are you going to compare the UDID that the app sends with? The only time you can get a UDID from the phone is when the user first runs your application. Unless you're planning to only support specific devices for which you already know the UDID, you won't have anything to compare it with until after the first time the app sends the UDID to the server. The problem is that this isn't going to prevent piracy because the app could be pirated before the first time its run, so a pirated app can still send a valid UDID. (continued in next comment)
Jasarien
Jasarien