| I was recently working on an iOS app where I needed a 1-to-1 chat feature. I was surprised that there wasn't an established market leader in this space considering how many apps use such a feature. When I saw this post I immediately thought "yep, that is a gap I'd seen in the market". Some existing platforms included Scringo, Lobi SDK, QuickBlox. None seemed polished or customisable enough for my purposes. See more here: http://www.quora.com/Are-there-any-existing-APIs-for-impleme... I ended up using an open-source iOS chat UI control (https://github.com/jessesquires/MessagesTableViewController) and Firebase (here is a sample project of a real-time iOS chat app: https://github.com/firebase/firechat-ios). It was incredibly easy to setup a real-time chat app and provides me with full UI customisation and a flexible and scalable data backend. Send and receive code: // Setup.
self.firebase = [[Firebase alloc] initWithUrl:kFirechatNS];
// Listen for messages (real-time).
[self.firebase observeEventType:FEventTypeChildAdded withBlock:^(FDataSnapshot *snapshot) {
// Add the chat message to the array.
[self.chat addObject:snapshot.value];
// Reload the table view so the new message will show up.
[self.tableView reloadData];
}];
// Send message.
[[self.firebase childByAutoId] setValue:@{@"name" : self.name, @"text": aTextField.text}];
Thoughts on LayerIf Layer was around when I was looking I would have tried it out, however I am happy with Firebase as my backend now. The API looks insanely easy to use though. Media sharing features would be difficult to implement using what I described above so Layer would be advantageous here. Great branding. Also Layer, please make your iOS framework available on CocoaPods. |