Skip to main content

A8Chat iOS SDK

An iOS Framework that embeds the A8Chat functionalities in your iOS mobile application.

A8Chat Widget

An iOS Framework that makes it easy for mobile developers to build in-app A8Chat support.

Target OS: iOS 12+

Installation

Step 1: Download the A8ChatWidget.framework.zip file and extract it to a convenient location. In the Xcode Project Navigator, select your project and then select the app target that you want the framework to be integrated with.

A8Chat iOS SDK

Step 2: Navigate to General tab and scroll down to Embedded Binaries. Click + button.

A8Chat iOS SDK

Step 3: On the bottom-left of the pop-up, click Add Other and choose the A8ChatWidget.framework file that you downloaded earlier.

A8Chat iOS SDK

Step 4: A prompt will appear when importing, where you need to check Copy items if needed.

A8Chat iOS SDK

Step 5: Once you find the added framwework in the Embedded Binaries, change the drop-down value beside the name of the framework to Embed & Sign for embedding the the framework to your app.

A8Chat iOS SDK

Now, you have successfully added the framework to your project!

✅ A Quick Alternative way to do all the above is to just drag & drop the framework that you downloaded into your workspace and embed it in the Embedded Binaries section.

Importing

Use this import statement in the ViewController where you want to load the ChatWidget.

import A8ChatWidget

Implementation

Add the following code in your corresponding ViewController.swift, inside the viewdidLoad() and initialize the framework with your connection credentials.

// All the connection credentials here are just a sample
// Please use your credentials in the respective fields

WidgetBuilder(self).setOrgId(orgId: "5be9b2912c1bd52cbadfbe03")
.setuserId(userId: "1572948088")
.setAppKey(appKey:"0ed8de2c0564s642c4c5b318e97450rb3220ddbc4d2974cea53b1065s")
.setBotHandle(botHandle: "a8bot")
.setEmailId(emailId: "johndoe@gmail.com")
.setDisplayName(displayName: "John Doe")
.setEnvironment(envi: botEnvironment.testing)
.build()

Connection cannot be established to Chat without these credentials: orgid, appKey, botHandle, displayName, emailId and botEnvironment while userId can be optional.

botEnvironment decides the environment of your bot: testing, staging, and production.

License ©

A8ChatWidget is licensed under the terms of the Apache License, version 2.0. Please see the LICENSE file for full details

Contact

A8ChatWidget was developed by the Autonom8 iOS team. If you have any technical questions or concerns about this project feel free to reach out to Autonom8.