1.2.0 • Published 3 years ago
tkchatsdk v1.2.0
TKChatSDK
Chat SDK for IOS
How to install
CocoaPods
pod "TKChatSDK", :git => 'git@github.com:tikivn/TKChatSDK.git'
Client app setup
Set up configuration
//Mark: - Set config
TKChatSDK.setConfig(TKChatSDK.setConfig(.default))
TKChatSDK.registerLink()
Set authenticate user
///Set when login successfully
TKChatSDK.setAuthenticate({access_token}, {refresh_token})
//Must clear when logout
TKChatSDK.clearUserInfo()
Handle Notifcation
TKChatSDK.didReceiveNotification(userInfo: response.notification.request.content.userInfo)
Go to channel
TKChatSDK.gotoChannel()
Get channel viewcontroller
TKChatSDK.getChannelVC(isFullScreen: Bool)
Go to channel detail
TKChatSDK.goToChannelDetail(from channelId: String,
channelType: String?,
bizId: String?,
attachment: TKChatAttachment?,
defaultMessage: String)
Support function
static func isAuthenticated() -> Bool
static func isUserChanged() -> Bool
Total unread message
TKChatSDK.getNumberOfUnreadMessage(success: @escaping ((_ total: Int) -> Void))
1.2.0
3 years ago