iOS
The iOS SDK can be used to add Teneo bot functionality to iOS, tvOS or watchOS applications. It handles communication with the Teneo Engine and makes it fast and easy to add Teneo chat functionality to your iOS app. See iOS Chat for an example project that uses this SDK.
The source code for the iOS SDK can be found on GitHub.
Requirements
- iOS 11.0+ / macOS 10.13+ / tvOS 12.0+ / watchOS 5.0+
- Xcode 10.2+
- Swift 4.2+
Basic Use
Setup
swift
1do {
2 try TieApiService.sharedInstance.setup("BASE_URL", endpoint: "ENDPOINT")
3} catch {
4 // Handle errors here
5}
6Send Input
swift
1TieApiService.sharedInstance.sendInput({MESSAGE},
2 parameters: {PARAMETERS},
3 success: { response in
4 // Handle response. Remember to dispatch to main thread if updating UI
5}, failure: { error in
6 // Handle error
7})
8Close Session
swift
1TieApiService.sharedInstance.closeSession({ response in
2 // Handle response. Remember to dispatch to main thread if updating UI
3}, failure { error in
4 // Handle error
5})
6Installation
CocoaPods
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
bash
1$ gem install cocoapods
2To integrate TieApiClient into your Xcode project using CocoaPods, specify it in your Podfile:
ruby
1pod "TieApiClient"
2Then, run the following command:
bash
1$ pod install
2License
TieApiClient is released under the Apache License, Version 2.0. See LICENSE for details.