To get started, install the SDK and then update some of the properties in your project.
Install the Frameworks
You can install the SDK using CocoaPods, or you can download and install the frameworks manually.
Install with CocoaPods
If you haven’t already done so, install the CocoaPods gem, and initialize the CocoaPods main repository.
CocoaPods Setup
1sudo gem install cocoapods2pod setup
If you already have CocoaPods installed, update your pods to the latest version.
CocoaPods Update
1pod update
To create a Podfile, change to the root directory of your application project. Then create or edit the file named Podfile.
Add the following lines to your project’s Podfile. The Agentforce SDK podspec will pull in additional dependencies as needed.
At the top of your Podfile, add the Salesforce Mobile iOS Spec Repo above the CocoaPods trunk repo. Make sure to add the CocoaPods CDN if you use any other CocoaPods dependencies.
1pod 'AgentforceSDK'2pod 'Messaging-InApp-Core', '> 1.10.0'3pod 'LiveKitClient' # Required to ensure CocoaPods looks in the correct source location
At the bottom of your podfile where you set up your post installer, configure it as shown:
Podfile Post Install
1post_install do |installer|2 installer.pods_project.targets.each do |target|3 target.build_configurations.each do |config|4 config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'5 end6 end7end
After adding the pods, run pod install from your project’s root directory. If CocoaPods is unable to locate the specs, try pod install --repo-update.
Dependencies
The AgentforceSDK includes the following key dependencies: