问题
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