iOS SDK quick start

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.

Install the iOS SDK

You can install the the Ada iOS SDK manually or using CocoaPods. The SDK supports iOS 10.x and up.

Install iOS SDK manually

  1. Download the AdaEmbedFramework.xcframework.zip file from the latest release here. (For releases earlier than 1.8.0, the file is AdaEmbedFramework.framework.zip.)
  2. Right-click on the project file in XCode, then click Add Files to MyProjectName. Ensure that the Copy groups option is selected.
  3. Ensure your Deployment Target is set to 10.0, which is the minimum iOS version that the Ada iOS SDK is compatible with.
  4. In the project settings under General, link AdaEmbedFramework.xcframework ( or AdaEmbedFramework.framework for releases before 1.8.0) under the Embedded Binaries section. (Drag the framework from the left side list in the Embedded Binaries list.)

Install iOS SDK using CocoaPods

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

  1. Add the AdaEmbedFramework to your Podfile.

  2. Install the pod using: pod install.

# Podfile
platform :ios, '10.0'

target 'MyApp' do
  use_frameworks!

  # Pods for MyApp
  pod "AdaEmbedFramework", "~>1.8.0"

end

Import the framework

Once you've installed the Ada iOS SDK, you're ready to use it in your app!

  1. Import AdaEmbedFramework into your controller.
  2. Create an instance of the AdaWebHost, as in the example below, replacing my-bot with 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.

Launch Ada

Finally, launch Ada using one of the three opening methods: