Acquire

iOS SDK integration

iOS SDK integration in you personal mobile app could be done in to two ways :

1. Integration using Cocoa-pods.

2. Manual Integration.

Integration using CocoapodsTo start using Acquire v1.0.2 in your project, add one of the following lines to your Podfile according to the version which you wish to integrate.

pod 'Acquire', '1.0.2' # For normal version

And run pod install or pod update to refresh your cocoapods dependencies.

Manual IntegrationGet the latest SDK zip

Download the latest for the Acquire iOS SDK.

https://developer.acquire.io/ios/sdk-setup-guide/getting-start-ios

The zip file Acquire.framework contains- Acquire.h

Acquire main API header file-AcquireClient.h

Support API methods header file- Acquire-Swift.h

Acquire swift library for use Socket connection- call.aiff

Sound file for agent call ringtone- new_message.aiff

Sound file for agent message alert ringtone- AcquireTheme/

Folder containing theme configuration to match the design of your app

Add the latest stable SDK release to your project

Unzip the sdk & drag-drop Acquire.framework files into your Xcode project.

In Build Phases, verify that Acquire.framework is in the Link Binary with Libraries and the Acquire resources are in Copy Bundle Resources

Add the following frameworks to Link Binary with Libraries -

Explanation :

The Acquire SDK uses background mode Audio for when you are video/voice call to agent/visitor. If you have not enable then background voice will not work. When the UIBackgroundModeskey contains the audio value, the system’s media frameworks automatically prevent the corresponding app from being suspended when it moves to the background. Go to Project/Targets -> Capabilities -> Background Modes -> Audio, AirPlay (Check).

For xcode 8 or later:

Go to Project/Targets -> [Project Name] -> Build Settings.

Search "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES"

Click the right of Debug, and selected 'Other', input "$(inherited)"

Do same with 'Release' and install your pod

In iOS 10, Before you access privacy-sensitive data like Camera, Microphone, and so on, you must ask for the authorization, or your app will crash when you access them.

Open the file in your project named info.plist, right click it, opening as Source Code, paste this code below to it. Or you can open info.plist as Property List by default, click the add button, Xcode will give you the suggest completions while typing Privacy - with the help of keyboard.

Remember to write your description why you ask for this authorization, between <string> and </string>, or your app will be rejected by apple:


NSCameraUsageDescription
$(PRODUCT_NAME) use camera for video chat

NSMicrophoneUsageDescription
$(PRODUCT_NAME) use microphone for voice chat

NSPhotoLibraryUsageDescription
$(PRODUCT_NAME) send photo/video to agent

For any further help on Account ID, SDK Configuration,Examples, Theme settings and support please visit this link : https://developer.acquire.io/ios/sdk-setup-guide/getting-start-ios

Table Of Content