Getting Started
The following steps need to be performed to be able to use this framework in your application.
Prerequisites
- Xcode7 or later
- iOS 9.0 or later
- CocoaPods
Obtain access key
- At admin.bold360.com, click .
-
Create an access key if necessary:
- Click Create New.
- Select the Chat Window, Department and Website to be associated with the API key.
- Click Save
- Copy the access key and use it for BCAccount initialization.
Configure Your Xcode Project
Using CocoaPods on an existing Xcode project modifies the project file, so make sure you create a backup before doing the configuration.
- Create a file called Podfile in the root directory of your project.
-
Add the official CocoaPods PodSpecs repository to your
Podfile:
source 'https://github.com/CocoaPods/Specs.git'
-
Add the Bold360ai PodSpecs repository to your Podfile:
source 'https://github.com/nanorepsdk/NRSDK-specs.git'
-
Add the BoldEngine iOS SDK to your Podfile:
pod 'BoldEngine'
-
Optionally, if you need Bold including UI:
pod 'BoldUI'
Note: This framework does not include a UI by default. -
In the
terminal, select your project root directory as the
working path and type the following:
All files required to integrate 'BoldEngine' into your project are downloaded.pod update
Start Coding
The SDK is now set up. If you want to use the BoldChatViewController the following import is needed where you use it in the code.
#import <Bold360UI/BoldChatViewController.h>
To use the core level SDK use the following import.
#import <BoldEngine/BoldEngine.h>
Basic Sample
To see a basic sample, do the following:
- Download the BoldEngine Basic Sample.
-
After downloading the sample, have a look a the following
files:
- Podfile - To see how to get BoldEngine.
- ViewController.swift
To see import:
import BoldEngine
To see usage:
var account: BCAccount? = nil