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.
This installation guide covers the Pre-built UIKit of Brand Messenger iOS SDK. The iOS Brand Messenger SDK can be installed using CocoaPods.
Install the following:
- Xcode 13.0 or later
- CocoaPods 1.9.0 or later
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
BrandMessenger is available through CocoaPods. To install it,
- Open Terminal
- Navigate to the root directory of your Project (the directory containing the .xcodeproj file)
- Run the following command:
- Navigate to your project's root directory
- Open the Podfile
- 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', '1.14.1' # Required to add end
- Navigate to your project directory containing the Podfile in Terminal
pod updateto refresh the CocoaPods dependencies
- Open your project's newly-generated or existing xcworkspace to build the project
The new xcworkspace file has the pod pre-installed.
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>
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;
Updated about 2 months ago