For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

1

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.

Cocoapods

CocoaPods is an open source dependency manager for iOS projects. It is scheduled for end of life in December 2026.

Steps

  1. Make sure you are using CocoaPods v1.10.0 or above.

  2. 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.

end
  1. Run pod install --repo-update to 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.
  1. Open your project using the xcworkspace file and verify that Xcode builds your app without any issues.

Carthage

Carthage is a decentralized, lightweight dependency manager for iOS.

Steps

  1. 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-xcframeworks

3. 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:

  1. Go to the General tab of your target settings.

  2. Click the + button under the Frameworks, Libraries, and Embedded Content heading.

  3. Click Add Other and then Add Files.

  4. Choose the Sentiance XCFramework file and click Open.

  5. After the item has been added to the list, change the Embed option next to the framework to Do Not Embed.

  6. 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:

  1. Go to the Build Phases tab of your target settings.

  2. Expand the Copy Bundle Resources row and click the + button.

  3. Choose the SENTSDK.bundle file located inside the SENTSDK library.

  4. 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:

  1. Go to the General tab of your target settings.

  2. Click the + button under the Frameworks, Libraries, and Embedded Content heading.

  3. Click Add Other and then Add Files.

  4. Go to the Frameworks folder inside the Sentiance framework, select the dependency .xcframework file and click Open.

  5. 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 & Sign

5. Update the Build Settings

  1. Go to the Build Settings tab of your target settings.

  2. Look for Other Linker Flags in the Linking section.

  3. Add -lz , -all_load, and -lc++

2

Configure the Project Capabilities

  1. Open your project in Xcode

  2. In the Project Navigator (left sidebar), click the blue project icon at the top

  3. Under TARGETS, select your app target

  4. At the top of the editor, open the Signing & Capabilities tab

  5. Click the “+ Capability” button near the top-left of the editor

  6. In the capability list, select Background Modes

  7. In Background Modes, enable the following capabilities:

    • Background Fetch

    • Background Processing

    • Location Updates

The configuration should appear similar to the example shown below:

3

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):

  1. At the top of the editor, open the Info tab

  2. Under Custom iOS Target Properties, locate Permitted background task scheduler identifiers

  3. If the key does not exist, click + and add it as an Array

  4. Add the following background task identifier as a String item in the array: com.sentiance.backgroundtask.task_processing

The configuration should appear as follows:

4

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.

  1. Open your project's Info tab.

  2. Add the required privacy keys if they don’t already exist.

  3. 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 Description

    • Privacy - Location When In Use Usage Description

    • Privacy - Location Always and When In Use Usage Description

    • Privacy - 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:

5

Next: Initialize the SDK

After having included the sentence SDK, proceed to initializing the SDK.

Last updated