Is it possible to delete text messages?

Discussion in 'iOS Development' started by cybohemia, Jul 30, 2009.

  1. cybohemia

    cybohemia New Member

    Joined:
    Jan 25, 2009
    Messages:
    49
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    Is it possible to programmatically delete text messages from within an app?
  2. Cyanidepoison

    Cyanidepoison Active Member

    Joined:
    Jan 18, 2008
    Messages:
    1,076
    Likes Received:
    2
    Yeah, open the SMS database and do it yourself.
  3. Jeepston

    Jeepston New Member

    Joined:
    May 17, 2009
    Messages:
    45
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    It's not that easy. There are a bunch of triggers in sms.db (including delete_message which triggers when you try to delete a message from db). Those triggers make a call to some function read with flags as an argument. This function must be defined in your program. And I suspect that it does some binary operations with flags (field in message table).

    So the dirty workaround will be dropping delete_message trigger, deleting a message and then setting up that trigger again.

Share This Page