My client has come up with a strange requirement. He wants the iOS application to be deleted from the iPad/iPhone on 5 unsuccessful login attempts. I want to tell him that, its just NOT possible. Does anyone know any way of programmatically write a piece of code to self destruct an iOS app ?
Asked
Active
Viewed 622 times
0
-
3you just answered your own question **NOT possible.** – iNoob Feb 22 '12 at 12:36
-
1So what is behind this request? What use case is your client trying to fulfill? If you can figure out what is driving this, perhaps you can figure out a way to actually implement something that suits his needs. (But it does sound like a rather fanciful requirement) – Peter M Feb 22 '12 at 12:42
-
Maybe he wants the app to self destruct, so that the person who currently owns the phone (phone can also be stolen) cannot access the app anymore. I know the app cannot be destroyed, but the contents within the app can be destroyed. However, if the data resides on a server, those data cannot be destroyed.. Apple has implemented Device Wipe on failed login attempts, but not for individual apps. May be he thinks its possible too... i will try explaining him the facts. – Anil Feb 22 '12 at 13:12
-
1@Anil .. if he wants an "App wipe" and the data is local, then you can wipe the data (see note) but if the data is server based, then the server can just lock the user out. Note: If the data is that important then it needs to be encrypted somehow, otherwise you can just pull it off the phone without using the App. – Peter M Feb 22 '12 at 13:20
-
This is not his requirement. This is his proposed solution to an unspecified requirement. Go back to the source with questions aimed to aid your understanding of his thinking. Try to get into what it is he is attempting to achieve. – Cheekysoft Feb 22 '12 at 14:24
2 Answers
1
At least on non-jailbroken devices this won't be possible. I mean, you can't even close an app without the user explicitly pressing the Home button. Also, the user could just re-download the app, rendering self-destruction moot.
You could - as is common in the Internet - just ban the client's IP or UDID for a while. Or store the number of login attempts on the device and refuse to let the user log in after too many attempts.
JiaYow
- 5,207
- 3
- 32
- 36
-1
You can lock the user out of the application, and delete all of the cached data. But no, you can't erase it.
I suppose you could call abort() on every launch after 5 failed attempts, but I'm not sure you'll get through review if that happens.
Ell Neal
- 6,014
- 2
- 29
- 54
-
1He likely won't, see the discussion here http://stackoverflow.com/questions/355168/proper-way-to-exit-iphone-application – JiaYow Feb 22 '12 at 13:15
-
Locking the user out ? If the person is trying some random username and passwords, which users data should I lock ? – Anil Feb 22 '12 at 13:18
-
1@Anil Erase all cached data. By locking them out I mean never show the first view controller, just show an image or something. – Ell Neal Feb 22 '12 at 13:45