You can choose from two methods for retrieving the history of a channel. They return the history(if available) in JSON format with message timestamp.
If you do not wish to receive the timestamp of each message, set returnTimestamp
to false
. By default it is set to true
.
a. Count:
50 latest messages will be returned from the server with their respective timestamps.
[pusheo historyForChannel:@"12345" type:@"limit" limit:@"50" timestamp:@"" returnTimestamp:YES];
b. Timestamp:
Messages from the given timestamp till date will be returned without their respective timestamps.
[pusheo historyForChannel:@"12345" type:@"timestamp" limit:@"" timestamp:@"1354735353657" returnTimestamp:NO];