-1

I am developing an application for security purpose which has 1 requirement as "Wipe out iPhone or i pad data completely if device is stolen".

While doing search for this functionality, I came across one application "Find My iPhone" here which supports this feature of "remotely wipe out all data". (http://www.howtogeek.com/77158/how-to-remotely-lock-or-wipe-your-ios-5-device/)

But i want to this functionality through programmatically in my app.Can someone give me a solution for this problem?

And is it possible to do this functionality through programmatically?

Krish
  • 4,166
  • 11
  • 58
  • 110
  • 1
    This would be terribly unsafe... – Reece Kenney Aug 24 '15 at 10:24
  • 1
    Btw, Find My iPhone is a built-in iOS app, created by Apple itself. Apple would never let you perform something like that. – danialzahid94 Aug 24 '15 at 10:29
  • 1
    How would the app determine that the phone was stolen? And what would entice the thief to run the app so it could try? This looks like a "please write my malware for me" question. – molbdnilo Aug 24 '15 at 12:27

2 Answers2

2

You cannot completely wipe a standard iPhone's data from an app. The app runs in a sandbox environment so you cannot access data from other apps or iOS itself meaning that you cannot wipe it. That being said, you could wipe photos and contacts programmatically as long as the user grants you access to contacts and photos.

Swinny89
  • 7,273
  • 3
  • 32
  • 52
  • do you have source code for deleting photos and contacts? – Krish Aug 24 '15 at 10:42
  • Not to hand no. But that's a different question entirely – Swinny89 Aug 24 '15 at 10:42
  • Address book: https://developer.apple.com/library/ios/documentation/AddressBook/Reference/ABAddressBookRef_iPhoneOS/ Photos: https://developer.apple.com/library/ios/documentation/Photos/Reference/PHPhotoLibrary_Class/ – Swinny89 Aug 24 '15 at 10:46
2

There is NO WAY that Apple would let programmers wipe data remotely for the entire device.

Instead of doing that, maybe you should have functionality in your app where if server returns a particular flag, you would delete all the data stored locally on your app, by you (like login details for your app, personal data stored in Documents). I suggest that, because I've done it before.

Shamas S
  • 7,507
  • 10
  • 46
  • 58
  • is there is the way to delete photos or contacts in device ? – Krish Aug 24 '15 at 10:32
  • I'm not really sure about that. Quick search got me these links http://stackoverflow.com/questions/1800238/how-to-delete-a-contact-from-address-book-in-iphone-using-objective-c and http://stackoverflow.com/questions/4142061/is-is-possible-to-delete-photos-from-cameraroll-programmatically. You will have to test them programmattically though. – Shamas S Aug 24 '15 at 10:35