Add in Package.swift
or directly in Xcode Project dependencies
section:
.package(url: "https://pubgi.fanapsoft.ir/chat/ios/chat.git", .upToNextMinor(from: "1.3.2")),
Because it has conflict with other Pods' names in cocoapods you have to use direct git repo.
Add in Podfile
:
pod 'Starscream', :git => 'https://github.com/daltoniam/Starscream.git', :tag => '3.1.1'
pod 'Additive', :git => 'http://pubgi.fanapsoft.ir/chat/ios/additive.git', :tag => '1.0.1'
pod 'Mocks', :git => 'http://pubgi.fanapsoft.ir/chat/ios/mocks.git', :tag => '1.0.1'
pod 'Logger', :git => 'http://pubgi.fanapsoft.ir/chat/ios/logger.git', :tag => '1.0.2'
pod "Async", :git => 'http://pubgi.fanapsoft.ir/chat/ios/async.git', :tag => '1.3.1'
pod "ChatCore", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat-core.git', :tag => '1.0.1'
pod "ChatModels", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat-models.git', :tag => '1.0.2'
pod "ChatDTO", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat-dto.git', :tag => '1.0.2'
pod "ChatExtensions", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat-extensions.git', :tag => '1.0.2'
pod "ChatCache", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat-cache.git', :tag => '1.0.2'
pod "Chat", :git => 'http://pubgi.fanapsoft.ir/chat/ios/chat.git', :tag => '1.3.2'
let asyncConfig = AsyncConfigBuilder()
.socketAddress("socketAddresss")
.reconnectCount(Int.max)
.reconnectOnClose(true)
.appId("PodChat")
.serverName("serverName")
.isDebuggingLogEnabled(false)
.build()
let chatConfig = ChatConfigBuilder(asyncConfig)
.token("token")
.ssoHost("ssoHost")
.platformHost("platformHost")
.fileServer("fileServer")
.enableCache(true)
.msgTTL(800_000)
.isDebuggingLogEnabled(true)
.persistLogsOnServer(true)
.appGroup("group")
.sendLogInterval(15)
.build()
ChatManager.instance.createOrReplaceUserInstance(config: config)
ChatManager.activeInstance?.delegate = self
ChatManager.activeInstance?.connect()
ChatManager.activeInstance?.getThreads(.init(), completion: { response in
if let response.result {
// Write your code here.
}
}
For more information about how to use Chat SDK visit Documentation
For more example and usage you can use developer implementation app
Please see the contributing guide for more information.
link |
Stars: 1 |
Last commit: Yesterday |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics