0

I'm working in a instant messaging using pubnub as backend on iOS. After some googling, I found this way but for scala.

http://scalabl3.github.io/pubnub-design-patterns/2015/02/26/Message-Update-Delete.html

I wonder if there is a exist way in API to archive this?

Q.u.a.n.g L.
  • 1,564
  • 1
  • 12
  • 27

2 Answers2

2

Pubnub does not currently support deleting things from message history.

Mathew Spolin
  • 371
  • 1
  • 11
2

PubNub allows delete messages from the channel

eg:

let startDate = NSNumber(value: (15101397027611671 as CUnsignedLongLong))
let endDate = NSNumber(value: (15101397427611671 as CUnsignedLongLong))
self.client.deleteMessage().channel("channel").start( startDate ).end(
endDate).performWithCompletion ( { (status) in

if !status.isError {
    // Messages within specified time frame has been removed.
} else {
   /**
    * Handle message history download error. Check 'category' property to find out possible 
    * issue because of which request did fail.
    *
    * Request can be resent using: status.retry()
    */
}

})

Refer pubnub documentation for more details

Shelly Pritchard
  • 10,777
  • 4
  • 18
  • 17