iOS
External Dependencies
The Sentiance SDK has the following external library dependencies. These are automatically included during the build.
TSENTensorFlowLiteC: version
2.20.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.
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.
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
The configuration should appear similar to the following example:

Last updated