The Ada iOS SDK is a small framework that you can use to embed your Ada chatbot into your native iOS application.
It also supports actions and settings that you can use to customize the behavior of your bot. For example, you might want to set the bot language, or customize the greeting. The iOS SDK reference covers these options and more.
You can install the the Ada iOS SDK manually or using CocoaPods. The SDK supports iOS 10.x and up.
- Download the
AdaEmbedFramework.framework.zipfile from the latest release here.
- Right-click on the project file in XCode, then click Add Files to MyProjectName. Ensure that the Copy groups option is selected.
- Ensure your Deployment Target is set to 10.0, which is the minimum iOS version that the Ada iOS SDK is compatible with.
- In the project settings under General, link
AdaEmbedFramework.frameworkunder the Embedded Binaries section. (Drag the framework from the left side list in the Embedded Binaries list.)
The AdaEmbedFramework CocoaPod is public, however, use of the chat interface is gated. To gain access please reach out to an Ada Account Manager.
Before you begin, get the latest version at https://cocoapods.org/pods/AdaEmbedFramework
AdaEmbedFrameworkto your Podfile.
Install the pod using:
# Podfile platform :ios, '10.0' target 'MyApp' do use_frameworks! # Pods for MyApp pod "AdaEmbedFramework", "~>1.3.0" end
Once you've installed the Ada iOS SDK, you're ready to use it in your app!
AdaEmbedFrameworkinto your controller.
- Create an instance of the
AdaWebHost, as in the example below, replacing
my-botwith the actual name of your bot.
import AdaEmbedFramework # ... lazy var adaFramework = AdaWebHost(handle: "my-bot")
The lazy property prevents AdaWebHost from initializing until the property is used. Use of this property may help to prevent unwanted chatters from being created in the background.
Finally, launch Ada using one of the three opening methods: