iOS
External Dependencies
The Sentiance SDK has the following external library dependencies. These are automatically included during the build.
TensorFlowLiteC: version
2.17.0. If your app depends on a different version, please reach out to us to address possible incompatibility issues.Protobuf: version
3.18. A higher version is also acceptable.UnzipKit: version
1.9. A higher version is also acceptable.
Steps
Add the Dependency
There are several ways to include the Sentiance SDK in your project. Choose the method that best fits your setup. The latest SDK version can be found at Versions & Changelog.
Swift Package Manager (Recommended)
Swift Package Manager is a tool for managing dependencies which simplifies adding 3rd-party frameworks to your projects.
Steps
In your Xcode project, go to File -> Add Package Dependencies.
In the search bar, enter the URL: https://github.com/sentiance/sentsdk-package
Select sentsdk-package from the results.
Choose "Up to Next Minor Version" as the Dependency Rule. The latest SDK version can be found at Versions & Changelog.
Select your project from the "Add to Project" section, and click Add Package. Wait for the product selection dialog to load.
A dialog will appear showing the following packages:
ProtocolBuffersObjCSENTSDKTensorFlowLiteCUnzipKit
On the same dialog box, use "Add to Target" to add all packages to your app.
Finally, in your project build settings, add the following to the Other Linker Flags:
-lz-lc++-all_load
If at any point you need to redo the package installation, you can remove the SENTSDK and its packages through your Project > select your target > General > Frameworks, Libraries, and Embedded Content.
Cocoapods
CocoaPods is an open source dependency manager for iOS projects. It is scheduled for end of life in December 2026.
Steps
Make sure you are using CocoaPods v1.10.0 or above.
In your
Podfile, add the Sentiance SDK pod dependency:
## Target Development Version
platform :ios, '15.0'
target 'MyApp' do
use_frameworks!
## Pods for your app
pod 'SENTSDK', '~>x.y.z' # Replace x.y.z with the latest SDK version.
endRun
pod install --repo-updateto install the Sentiance SDK pod. The result should look as follows:
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Installing Protobuf (3.29.6)
Installing SENTSDK (6.21.3)
Installing TensorFlowLiteC (2.17.0)
Installing UnzipKit (1.9)
Generating Pods project
Integrating client project
[!] Please close any current Xcode sessions and use `MyApp.xcworkspace` for this project from now on.
Pod installation complete! There is 1 dependency from the Podfile and 4 total pods installed.Open your project using the
xcworkspacefile and verify that Xcode builds your app without any issues.
If Xcode runs into rsync or sandbox errors, please follow the steps here to enable sandbox code.
Sandbox: rsync(59862) deny(1) file-write-create
If you see target deployment warning for Protobuf and Unzipkit, you can safely ignore them:
Protobuf: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 12.0 to 26.2.99.
Unzipkit: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 12.0 to 26.2.99.
Carthage
Carthage is a decentralized, lightweight dependency manager for iOS.
Steps
Add the following line in your
Cartfile:
binary "https://sentiance-u1-sdk-downloads.s3-eu-west-1.amazonaws.com/ios/carthage/SENTSDK.json"2. Then run the following command in the terminal:
carthage update --use-xcframeworks3. Drag the built .xcframework binary from Carthage/Build/ into Frameworks, Libraries and Embedded content section under General tab of your application target.
4. Depending on your Xcode setup, it might be required to add the following libraries: libz.tbd (previously libz.dylib), CoreMotion, SystemConfiguration, CoreLocation, Foundation, CallKit, CoreTelephony, CoreData.
5. Follow steps 3, 4, and 5 of the manual integration guide.
Manual Integration
If you want to include the Sentiance SDK without using any dependency management tool, follow the steps below. Note that to keep up with new SDK patches and versions, you will need to update the SDK framework manually.
Steps
1. Download the SDK
Download the latest umbrella Sentiance iOS SDK.
2. Import the Framework
After you've downloaded and unzipped the SDK, import it as a linked library in your Xcode project:
Go to the General tab of your target settings.
Click the + button under the Frameworks, Libraries, and Embedded Content heading.
Click Add Other and then Add Files.
Choose the Sentiance XCFramework file and click Open.
After the item has been added to the list, change the Embed option next to the framework to Do Not Embed.
Depending on your Xcode setup, it might be required to add the following libraries: libz.tbd (previously libz.dylib), CoreMotion, SystemConfiguration, CoreLocation, Foundation, CallKit, CoreTelephony, CoreData.
3. Include the Bundles
Include the SDK and Protobuf bundles in your project:
Go to the Build Phases tab of your target settings.
Expand the Copy Bundle Resources row and click the + button.
Choose the SENTSDK.bundle file located inside the SENTSDK library.
Next, choose the Protobuf_Privacy.bundle file located inside the Protobuf library.
4. Import the Dependencies
The SDK XCFramework includes all its necessary dependencies under the External directory. For each dependency, do the following:
Go to the General tab of your target settings.
Click the + button under the Frameworks, Libraries, and Embedded Content heading.
Click Add Other and then Add Files.
Go to the Frameworks folder inside the Sentiance framework, select the dependency .xcframework file and click Open.
After the item has been added to the list, update the Embed option next to the framework as follows:
ProtocolBuffers.xcframework - Do Not Embed
UnzipKit.xcframework - Do Not Embed
SENTTensorFlowLiteC.xcframework - Embed & Sign
mpde.xcframework - Embed & Sign
dskoball.xcframework - Embed & Sign5. Update the Build Settings
Go to the Build Settings tab of your target settings.
Look for Other Linker Flags in the Linking section.
Add
-lz,-all_load, and-lc++
Configure the Project Capabilities
Open your project in Xcode
In the Project Navigator (left sidebar), click the blue project icon at the top
Under TARGETS, select your app target
At the top of the editor, open the
Signing & CapabilitiestabClick the “+ Capability” button near the top-left of the editor
In the capability list, select Background Modes
In Background Modes, enable the following capabilities:
Background FetchBackground ProcessingLocation Updates
The configuration should appear similar to the example shown below:

Include the Background Task Identifier
The Sentiance SDK occasionally schedules background work, and as such, requires a background task identifier to be specified in your project's info (Info.plist):
At the top of the editor, open the
InfotabUnder Custom iOS Target Properties, locate
Permitted background task scheduler identifiersIf the key does not exist, click + and add it as an Array
Add the following background task identifier as a String item in the array:
com.sentiance.backgroundtask.task_processing
The configuration should appear as follows:

Configure Privacy Permission Descriptions
There are few permissions that required to support Sentiance's core functionality. Request these permissions by clearly explaining to users why they are needed and how the corresponding data will be used.
Open your project's
Infotab.Add the required privacy keys if they don’t already exist.
For each key, set a clear, user-friendly description explaining why the permission is needed and how it benefits the user:
Privacy - Location Always Usage DescriptionPrivacy - Location When In Use Usage DescriptionPrivacy - Location Always and When In Use Usage DescriptionPrivacy - Motion Usage Description
In the Info.plist file, these privacy settings will show up as:
NSLocationAlwaysUsageDescription
NSLocationWhenInUseUsageDescription
NSLocationAlwaysAndWhenInUseUsageDescription
NSMotionUsageDescription
The configuration should appear similar to the following example:

Last updated