iOS SDK
Installation
pod 'DeepConverse', :git => 'https://github.com/converselabs/ios-sdk.git', :branch => 'release'Setup
import UIKit
import DeepConverse
class ViewController: UIViewController {
private var sdk : DeepConverseSDK? = nil
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
var metadata = [String:String]()
metadata["draft"] = "true"
let session = DeepConverseSDKSession.init(
subDomain: <DOMAIN>,
botName: <BOT_NAME>,
metadata: metadata,
webViewTimeout: 60.0
)
sdk = DeepConverseSDK(delegate: self, session: session)
}
@IBAction func Click(_ sender: Any) {
sdk?.openBot(viewController: self)
}
}
extension ViewController: DeepConverseDelegate {
func didWebViewFail(withError: DeepConverseWebHostError) {
print("Did fail with error")
}
func didReceiveEvent(event: [String : Any]) {
}
func didCloseBot() {
print("Did Close")
}
func didOpenBot() {
print("Did Open")
}
}Last updated
Was this helpful?