Remote wipe app data in iOS

I am working on a corporate application, where the client has a requirement to erase all data stored by the application from the device remotely. That is, in the case when the user reports a lost device.

If we forget about its implementation on the service side, is it possible to remotely delete data stored in the application sandbox. How about deleting files present in application resources such as sqllite files and certificates?

I looked through this network and went to this site , which claims to be doing this in its product.

If this can be done, how can we approach this problem?

The remote wipe feature was added by Apple in iOS 4.2 using a mobile device. I do not think they do this through remote notifications. In this case, there would be no guarantee of a confident shot that the data is deleted from the device.

+2
ios iphone ios4 ipad
Jan 25 '11 at 11:00
source share
6 answers

The best way would be to encrypt the data on the iPhones disk and decrypt it only in memory (since iOS 4 has a similar mechanism built in). Before you allow the user to use the data, you ask the server whether the iPhone is allowed to encrypt data (even the best approach is that the server gives the iPhone a key to decrypt the data, so the attacker will not find it in the code). If the server rejects the request, the application wipes out all the saved data, and you are done.

This, of course, only works when your application is allowed to require an Internet connection (or at least connect to a local intranet where it can communicate with the server)

+4
Jan 25 2018-11-11T00:
source share

The only way I can decide to satisfy this requirement is to configure remote notifications and have an in-app notification handler that protects sensitive data at startup. This is not the best approach (I prefer some other suggestions in this thread), but in explicit form of this requirement, remote Apple notifications seem to be the only way.

+2
Jan 25 2018-11-11T00:
source share

I think you should transfer all the data that you want to erase in the Documents folder, and then wipe it if necessary

0
Jan 25 2018-11-11T00:
source share

We can delete items stored in the sqlite or documents folder when we receive a notification. But this is only possible when you open the application and receive a notification. I can give one example: When the application opens , the user will receive a message from your local server (maybe when logging in or when loading the first screen). when you receive this message, delete the data from the sqlite directory or documents you have ever used.

However, in this case, the application is required to be open. If you need data to delete, even if the application is not running, you may need to use a push notification

0
Jan 25 2018-11-11T00:
source share

The web page you are talking about talks about clearing mail and calendar data.

There is a MobileMe service that allows you to completely erase the phone, assuming that you have push ( details ) turned on.

Then, if someone β€œfinds” the phone and is smart enough to disable push and Find My iPhone in the settings before issuing a remote wipe command, they may leave with your data. It’s enough to scare off a petty telephone thief, but not the one after your data.

An application can delete its own data. But he can do this only with the active (foreground or background). Again, this becomes a time issue when you tell the application to remove what needs to be removed before someone is not authorized, can extract it.

0
Jan 25 '11 at 11:35
source share

Save everything in the Documents folder. then use the code in this thread to delete everything

 NSFileManager *fileMgr = [[[NSFileManager alloc] init] autorelease]; NSError *error = nil; NSArray *directoryContents = [fileMgr contentsOfDirectoryAtPath:documentsDir error:&error]; if (error == nil) { for (NSString *path in directoryContents) { if([path isEqualToString:@"cache.db"]) { //dont delete db } else { NSString *myFilePath = [documentsDir stringByAppendingPathComponent:path]; //NSLog(myFilePath); BOOL removeSuccess = [fileMgr removeItemAtPath:myFilePath error:&error]; if (!removeSuccess) { //handle errors? NSLog(@"Not deleted: %@ %@", path, [error userInfo]); } } } } else { // Error handling //... } 

Delete all files in the iPhone sandbox (folder with documents)?

-one
Jan 25 2018-11-12T00:
source share