Created
July 11, 2019 17:08
-
-
Save bookercodes/18aeee99f7db9bd500538f16eec24805 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CometChat.login(UID: "bendewberry", apiKey: "API_KEY", onSuccess: { (user) in | |
print("Login successful : " + user.stringValue()) | |
}) | |
let textMessage = TextMessage( | |
receiverUid: "#General", | |
text: "Hi everyone", | |
messageType: .text, | |
receiverType: .group) | |
CometChat.sendTextMessage(message: textMessage, onSuccess: { (message) in | |
print("TextMessage sent successfully. " + message.stringValue()) | |
}) | |
extension ViewController: CometChatMessageDelegate { | |
func onTextMessageReceived(textMessage: TextMessage) { | |
print("TextMessage received successfully: " + textMessage.stringValue()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment