Install Brand Messenger iOS SDK (APAC)

Learn about Brand Messenger installation in your iOS project

The following documentation is built to help you with installing our iOS SDK into your project. This guide utilizes CocoaPods. A complete UI kit (Brand Messenger iOS SDK) is written in Swift.

🚧

If you do not have your Company Key and/or Application ID, you can obtain these from Khoros Support.

Brand Messenger UIKit

This installation guide covers the Pre-built UIKit of Brand Messenger iOS SDK. The iOS Brand Messenger SDK can be installed using CocoaPods.

Prerequisites

Install the following:

  • Xcode 13.0 or later
  • CocoaPods 1.9.0 or later

Requirements

Make sure that your project meets these requirements:

  • Your project must target iOS 12 or later
  • A physical or simulator iOS device for testing and running the app

Automated Installation using CocoaPods

BrandMessenger is available through CocoaPods. To install it,

  1. Open Terminal
  2. Navigate to the root directory of your Project (the directory containing the .xcodeproj file)
  3. Run the following command:
pod init
  1. Navigate to your project's root directory
  2. Open the Podfile
  3. Add the required items to the file (lines 2, 3, and 6 from the example below):
source 'https://github.com/CocoaPods/Specs'
     use_frameworks!  # Required to add 
     platform :ios, '12.0' # Required to add

     target 'TARGET_NAME' do
     pod 'BrandMessenger', :git => '[email protected]:lithiumtech/ios-brandmessenger-sdk-dist.git', :tag => '1.9.0' # Required to add 
end
  1. Navigate to your project directory containing the Podfile in Terminal
  2. Run pod install or pod update to refresh the CocoaPods dependencies
  3. Open your project's newly-generated or existing xcworkspace to build the project

The new xcworkspace file has the pod pre-installed.

Add Permissions

🚧

The Apple App Store requires an app that accesses the device's camera, contacts, gallery, location, and/or a microphone to add a description of why the app needs to access these features.

In the Info.plist file of your project. Please add the following permissions:

<key>NSCameraUsageDescription</key>
<string>Allow Camera</string>
<key>NSContactsUsageDescription</key>
<string>Allow Contacts</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Allow location sharing!!</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow MicroPhone</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Allow Photos</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow write access</string>

Installation using BrandMessenger imports

Use the import example below to access the methods and classes inside the BrandMessenger for UIKit, Core, and Rich message style.

import BrandMessengerCore
import BrandMessengerUI
import RichMessageKit
@import BrandMessengerCore;
@import BrandMessengerUI;

Did this page help you?