问题
I'm developing an app for jailbroken iOS devices.
I want to delete a message from the user's Inbox - I deleted message on SMS.db (in the "message" table) but when I go to Inbox, it's still there with "blank" content and the sender's phone number.
On iOS 5, I deleted it perfectly using the CKSMSRecordDelete
, but on iOS 6, ChatKit.framework
doesn't work any more.
回答1:
Check out my answer here Block sms on ios6 To delete rows from SMS.db you need to use IMDPersistence.framework
If you want to do it manually then you should also delete rows from 'chat' and 'handle' tables. But I don't think this will work. Message will be deleted from database but will still show up in Messages application. You could try and kill 'com.apple.imagent' daemon. It deals with messages in iOS 6 and possibly retains messages in memory. It's will automatically restart and ideally reload SMS.db contents.
回答2:
Try some other software to wipe the text messages maybe work. According to some explanation, some data deleted by you are still existing in iPhone storage, they are not gone actually. Some profession data recovery software can detective them by somehow. So if you want to wipe data permanently without recovery, to find some tutorial on internet. such as How to erase text messages permanently may be suitable for you.
来源:https://stackoverflow.com/questions/15939771/delete-message-on-ios-6