This read.me include the quick start guide for LiveEngage In-App Messaging iOS SDK Sample Apps in Swift and Objective-C.
LiveEngage In-App Messaging SDK for iOS supports multiple methods of installations.
Option 1: Using CocoaPods
LiveEngage iOS SDK Sample App is based on LPMessagingSDK CocoaPods. The Podfile in the project is ready for used and already includes LPMessagingSDK CocoaPods source.
- If you have CocoaPods installed skip to step #2. Install cocoapods using the following command:
$ gem install cocoapods
- Run the following command in the terminal under your project folder to init pod use:
$ pod init
-
Podfile should be created under your project’s folder. To integrate Liveperson Messaging SDK into your Xcode project using CocoaPods, specify it in your Podfile:
# platform :ios, ‘10.0’ use_frameworks! source 'https://github.com/LivePersonInc/iOSPodSpecs.git' #LiveEngage Pod Repository target 'SampleApp-Swift' do #LPMessagingSDK Includes: LPAMS.framework, LPInfra.framework, LPMessagingSDK.framework and LPMessagingSDKModels.bundle pod 'LPMessagingSDK' end
-
Run the following command in the terminal under your project folder:
$ pod install
- Incase you wish to upgrade to the latest SDK version and you have already ran 'pod install', Run the following command:
$ pod update
- Run the project from SampleApp.xcworkspace file
Option 2: Using Libraries Copy to Xcode Project
Copy (Drag and Drop) all framework and bundle files into the project.
-
In project settings, navigate to the General tab, and add all Framework files to the Embedded Binaries section.
-
In the General tab, make sure that the framework files are under Embedded Libraries.
-
In Build settings, make sure Always Embed Swift Standard Libraries is set to YES.
-
In project settings, navigate to the Build Phases tab, and click the + button to add a New Run Script Phase. Add the script below in order to loop through the frameworks embedded in the application and remove unused architectures (used for simulator). This step is a workaround for known iOS issue and is necessary for archiving your app before publishing it to the App Store.
- If frameworks installed using CocoaPods, use the following script:
bash "${SRCROOT}/Pods/LPMessagingSDK/LPMessagingSDK/LPInfra.framework/frameworks-strip.sh"
- If frameworks installed using copy to Xcode project, use the following script:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/LPInfra.framework/frameworks-strip.sh"
Integration guide, API Documentation and Configurations can be found in Livepersons Developers Portal: https://developers.liveperson.com/consumer-experience-ios-sdk-quick-start.html