Fanap's POD Async iOS SDK
Add in Package.swift
or directly in Xcode Project dependencies
section:
.package(url: "https://pubgi.fanapsoft.ir/chat/ios/fanappodasyncsdk.git", .upToNextMinor(from: "1.2.0")),
Add in Podfile
:
pod 'FanapPodAsyncSDK'
let asyncConfig = AsyncConfigBuilder()
.socketAddress("socketAddresss")
.reconnectCount(Int.max)
.reconnectOnClose(true)
.appId("PodChat")
.serverName("serverName")
.isDebuggingLogEnabled(false)
.build()
let async = Async(config: asyncConfig, delegate: self)
async.createSocket()
Notice: Use the connection only it's in ASYNC_READY state
public func asyncStateChanged(asyncState: AsyncSocketState, error: AsyncError?) {
Chat.sharedInstance.delegate?.chatState(state: asyncState.chatState, currentUser: nil, error: error?.chatError)
if asyncState == .ASYNC_READY{
// Write your code here.
}
}
async.sendData(type: .message, message: message)
For more information about how to use Async SDK visit Documentation
For more example and usage you can use developer implementation app
Please see the contributing guide for more information.
link |
Stars: 0 |
Last commit: Yesterday |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics