LogoLogo
WebsiteGuide & TutorialBlogBook a Demo
2.0.0
2.0.0
  • Getting Started
  • Widget
    • Overview
    • Installation
    • Customization
      • Settings
        • Greeting
        • Greeting Introduction
        • Conversation button
        • Conversation list title
        • Launcher Text
        • Widget Appearance
      • Methods
        • Widget visibility
        • Widget window state
        • Set Customer Info
        • Get Customer info
      • Events/Callbacks
        • reloadUI
        • onChatMaximize
        • onChatMinimize
        • onChatInitiated/Started
        • onChatClosed
        • onAgentAssign
        • onAgentStateChange (Available/Unavailable)
      • Link resources
        • Share channel link
  • SDK
    • [Under Development] Overview
    • [Under Development] iOS
      • [Under Development] iOS Setup Guide
        • [Under Development] Getting Started
        • [Under Development] Integration Guide (Core)
        • [Under Development] Integration Guide (Lite)
      • [Under Development] Initialization
      • [Under Development] Theme Setting
      • [Under Development] Acquire Delegates for iOS
      • [Under Development] Widget customization
      • [Under Development] React Native
    • [Under Development] Android
      • [Under Development] Android Setup Guide
        • [Under Development] Getting Started
        • [Under Development] Integration Guide (Core)
        • [Under Development] Integration Guide (Lite)
      • [Under Development] Acquire SDK APIs
      • [Under Development] Acquire Delegates for Android
      • [Under Development] React Native
  • Webhooks
    • Introduction
    • Getting Started
    • Securing Webhook
    • Webhook Events
  • REST APIs
    • Introduction
      • Request Types, Permissions, Errors, & Limits
    • Authorization
    • Conversation
      • Cases
        • Messages
          • Retrieve a list of messages
          • Retrieve a message
          • Send a message
          • Update message
          • Delete Message
        • Case List
        • Single Case
        • Create
        • Close Case
        • Reopen Case
        • Invite Agent
      • Snooze
        • [Under Construction] Delete Snooze
        • Create Snooze
      • Notes
        • List all notes
        • Retrieve a note
        • Create
        • Add note message
        • Delete note
        • Retrieve note messages
    • Contact
      • List all contacts
      • Retrieve a contact
      • Add contact
      • Block Contact
      • Merge contact
      • Update contact
      • Delete contact
    • Company
      • List all companies
      • Retrieve a company
      • Add company
      • Update company
      • Delete company
    • Phone
      • Call in queue
      • Ringing
      • Answered
      • Call end
    • Chatbot
      • Conversational Bot
        • Groups
          • Get Default Group
          • List
          • Add
          • Delete
          • Copy
        • Question And Answer
          • List
          • Get
          • Add
          • Update
          • Delete
          • Publish
          • Bulk Action
          • Push QnA To Suggestions
          • Import QnA
      • Sequence Bot
        • Sequence List
        • Get Single Sequence
        • Add
        • Update
        • Delete
        • Bulk Action
        • Copy Existing Sequence
        • Branch
          • Get Single Branch
          • Add
          • Update
          • Delete
          • Set as Parent Branch
      • Bot resources
      • Webhooks in chatbot
    • Analytics
      • Custom Reporting
      • General Analytics
      • Chat
        • Overview
        • Tags
        • Visitor Information
          • Visitor Analytics
          • Visitor Source Overview
        • Video Analytics
      • Cobrowse
      • Chatbot
        • Sequence Bot
        • Conversational Bot
      • Knowledge Base
      • Email
      • VoIP - Call SMS
      • Agent Performance
    • [Under Construction] Custom Cards
      • Timeline-cards
        • Create Interaction Card
        • Update Interaction Card
        • List all Cards
        • Retrieve a card
        • Delete card
      • Exclusive cards
        • Create general card
        • Create app card - from other system
        • Delete card
    • Knowledge Base
      • Groups
        • Add
        • Update
        • Get
        • Get Single
        • Delete
      • Articles
        • Add Article
        • Update Article
        • Delete Article
        • Get Articles
        • Get Single Article
      • Category
        • Add Category
        • Update Category
        • Delete Category
        • Get Category
    • Settings
      • Account Settings
        • Users
          • List
          • Get Single
          • Add
          • Update
          • Delete
        • Roles
          • List
          • Get Single Role
          • Add
          • Update
          • Delete
        • Departments
          • List
          • Get
          • Add
          • Update
          • Delete
        • Custom Attributes
          • List of custom attributes
          • Get a custom Attribute
          • Add a custom attribute
          • Update a custom attribute
          • Delete a custom attribute
      • Conversation Settings
        • Shortcuts
          • List Groups
          • Get
          • Add
          • Update
          • Delete
        • Tags
          • List All Tags
          • Get Single Tag
          • Add New Tag
          • Update Tag
          • Delete Tag
        • Feedback
          • List of all feedback
          • Get single feedback
          • Add feedback
          • Update Feedback
          • Delete feedback
      • Security
        • Block Visitor
          • List
          • Get
          • Add
          • Delete
        • Audit Logs
          • Audit Log
          • Audit Log Users
Powered by GitBook
On this page
  • AcquireIO Support SDK
  • Setup and installation
  • Demo App
  • Contact us
  1. SDK
  2. [Under Development] iOS

[Under Development] React Native

Previous[Under Development] Widget customizationNext[Under Development] Android

Last updated 3 years ago

Our SDK is currently under review. Check back later for updates.

AcquireIO Support SDK

There are 2 variants for this SDK

1) AcquireIO support (Core) for real-time chat and audio/video calls. 2) AcquireIO support (Lite) for real-time chat.

Note: Lite version supports only chat feature. To use audio/video calls, Core version is available.

This guide describes the process of implementing AcquireIOSupport SDK into your React-Native app.

You can refer to use Native components.

We recommend using as the most advanced way of managing iOS project dependencies.

Installation

AcquireIOSupport SDK is the same as any other third-party native library.

To connect AcquireIOSupport SDK to your app just add it into your Podfile:

Step 1. Create a Podfile in your project's root directory, if it doesn't exist yet.

Step 2. Add below lines at top of your podfile

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

Step 3.

  • AcquireIOSupport-Core : Podname to add Core SDK to your project

  • AcquireIOSupport-Lite : Podname to add Lite SDK to your project

Add podname to Podfile as per requirement under your desired target. It must look like below:

  target 'YourTargetName' do
  config = use_native_modules!

  # NOTE: For AcquireIOSupport-Core require dynamic frameworks
  use_frameworks!
  pod 'AcquireIOSupport-Core'

  use_react_native!(
     :path => config[:reactNativePath],
     # to enable hermes on iOS, change `false` to `true` and then install pods
     :hermes_enabled => false
   )

  end

Note: use_frameworks! is required to import any dynamic framework.

Step 4. The AcquireIOSupport SDK supports module stability and therefore all its dependencies must be built-in with the "Build Libraries for Distribution" setting enabled, however this is not currently supported in Cocoapods. Running the below command will ensure Xcode builds the dependencies with the correct settings. Once Cocoapods supports module stability, this workaround can be removed.

Add the following at the end of your Podfile:

 post_install do |installer|
    react_native_post_install(installer)

     installer.pods_project.targets.each do |target|
       target.build_configurations.each do |config|
         config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
         config.build_settings['ENABLE_BITCODE'] = 'NO'
       end

     if (target.name&.eql?('FBReactNativeSpec'))
       target.build_phases.each do |build_phase|
         if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
           target.build_phases.move(build_phase, 0)
         end
       end
     end
   end
 end

4) Run the below command to install the SDK to your project

      $ pod install --repo-update

5) Open your project using the generated *.xcworkspace file.

Make sure to always open the Xcode workspace instead of the project file when building your project:

open YourTargetName.xcworkspace

Setup Info.plist

Since iOS 10, it's mandatory to add 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 the below code to it. Or you can open info.plist as Property List by default, click the add button, Xcode will give you the suggested completions while typing Privacy - with the help of keyboard and

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

<!-- Camera -->
<key>NSCameraUsageDescription</key>
<string>$(PRODUCT_NAME) uses camera for video chat</string>

<!-- Microphone -->
<key>NSMicrophoneUsageDescription</key>
<string>$(PRODUCT_NAME) uses microphone for voice chat</string>

<!-- Photo Library -->
<key>NSPhotoLibraryUsageDescription</key>
<string>$(PRODUCT_NAME) send photo/video to agent</string>

Also, The AcquireIOSupport SDK uses a background mode Audio when you are video/voice call to agent/visitor. If you have not enabled it, the background voice will not work. When the UIBackgroundModes key contains the audio value, the system’s media frameworks automatically prevent the corresponding app from being suspended when it moves to the background

To allow your AcquireIOSupport SDK to play audio in the background, Enable it using the below steps 1) Select your project file in the Navigator of Xcode. 2) From the Capabilities section, switch on the Background Modes subsection 3) Switch ON the Background Modes subsection. After background modes are listed, tick on the Audio, Airplay & picture in the picture

Setup and installation

  • To import SDK to your project, add the below lines to your App.js

    //Native modules
    import {NativeModules} from 'react-native';
    //Destructuring AcquireIO Setup from NativeModules
    const {AcquireIOSetup} = NativeModules;

    And to use in your FILENAME.m file, add

    #import <AcquireIOSupport/AcquireIOSupport.h>
  • To initialize SDK, call

        AcquireIOSetup.initAcquireIO()

Your FILENAME.m should look like:

#import "AcquireIOSetup.h"
#import <React/RCTLog.h>

@implementation AcquireIOSetup

RCT_EXPORT_MODULE(); // Use "AcquireIOSetup" as module's name


RCT_EXPORT_METHOD(initAcquireIO) {

  RCTLogInfo(@"Init AcquireIO");

  dispatch_async(dispatch_get_main_queue(), ^{

    //Config option
    NSDictionary *option = @{
                             @"ShowChatButton": @YES,
                             @"SessionConnectAndStartAuto":@YES  //@NO for manually start socket connection
                           };

    AcquireIOConfig *config = [AcquireIOConfig config];
    [config setDict:option];

    #warning(@"TODO: Add your ACCOUNT_ID (for example, xo3t0x)")
    [[AcquireIO support] setAccount:@"ACCOUNT_ID" withOptions:config];

    //[[AcquireIO support] startSession]; for manually start socket connection

  });

}

@end

Demo App

Contact us

Note: If you are new to CocoaPods, go to to learn how to install it.

Background Mode

To know more about customization of AcquireIOSupport chat theme, Go to .

To know more about initialization methods, .

For AcquireIOSupport delegate methods, Go to .

Check out our React-native demo app .

We're only a message away!. Feel free to contact us on for any queries you may have.

react-native-doc
CocoaPods
CocoaPods
Theme Customization
click here
Delegate Methods
here
AcquireIO Support