delete message on sqlite. jailbreak iphone

旧巷老猫 提交于 2019-12-23 02:49:16

问题


In my application, i want auto delete SMS messages. for example, when i click a button to trigger a method to execute SQL in sqlite.

the SQL is like this:

drop trigger if exists delete_message;
delete from message;
delete from madrid_chat;
CREATE TRIGGER if not exists delete_message AFTER DELETE ON message WHEN NOT read(old.flags) 
BEGIN 
UPDATE msg_group SET unread_count = (SELECT unread_count FROM msg_group WHERE ROWID = old.group_id) - 1 WHERE ROWID = old.group_id; 
END

it can execute successfully(the file is in /private/var/mobile/Library/SMS/sms.db). but in the SMS message application, the messages were deleted, and the chat group was not.

iphone is ios5.1.1, jailbroken. Does iOS have another way to save messages?

i download sms.db, and delete the madrid_chat and message tables' data. then i upload to iphone. but in SMS application, I always have old data. was the delete unsuccessful? NO, when i reboot the device, and reopen SMS application, the data are clear.

does the sms db have a cache?

来源:https://stackoverflow.com/questions/14434735/delete-message-on-sqlite-jailbreak-iphone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!