iOS
The Thryve iOS SDK is the fastest way to implement Thryve's product into your iOS application and is required to allow users to connect Apple Health as a data source. The Thryve iOS SDK is available as Cocoapods and frameworks. It requires:
Xcode: version 14.2 or later.
iOS Target: version 14 or higher is recommended.
To integrate the Thryve iOS SDK modules via Cocoapods into your application, follow these steps:
Add Thryve Specs Repository Open your terminal and navigate to your project directory. Then, execute the following command to add the Thryve Specs repository:
pod repo add ThryveSpecs https://git.thryve.de/thryve/Specs.gitUpdate Your Podfile Modify your Podfile to include the necessary Thryve SDK modules. Refer to the sample Podfile provided in the Thryve iOS Sample App for guidance.
Install Pods Run the following command in your terminal to install the specified pods:
pod install
Ensure you regularly update the Thryve Specs repository to get the latest features and fixes. For more details, visit the Thryve Specs Git repository: Thryve Specs.
platform :ios, '13.0'
source 'https://git.thryve.de/thryve/Specs.git'
target 'ThryveConnectorSample' do
use_frameworks!
pod 'ThryveCore', '5.3.1'
pod 'ThryveCommons', '5.3.1'
pod 'ThryveAppleHealth', '5.3.1'
pod 'ThryveShenAI', '5.3.1'
pod 'ThryveObservability', '5.3.1'
pod 'ThryveBLE', '5.3.1'
pod 'ThryveGarminCompanion', '5.3.1'
endTo integrate the Thryve iOS SDK into your app manually, download the Thryve SDK framework files and sample app code. Follow the instructions below for seamless integration.
Adding and Linking a Framework in Xcode
Add Framework
Right-click on your Xcode project's root and create a
New GroupnamedFramework.Drag and drop the extracted
.xcframeworkfolders from Finder into this group.In the dialog box, select
Copy items if needed,Create folder references, and choose the targets for the framework.

Link Framework
Navigate to
project root > target > General.Add the frameworks to
Frameworks, Libraries, and Embeded Contentby clicking the + button.Select the desired framework, such as
ThryveCoreorThryveCommons.Choose
Embed & Sign.
If you have followed the import correctly, the screen should look like this, depending on the imported frameworks.

To integrate the Thryve iOS SDK modules via Swift Package Manager (SPM) into your application, follow these steps:
Add Thryve Package Repository
In Xcode, navigate to
File > Add Package Dependencies. In the search field, enter the Thryve package repository URL:https://git.thryve.de/thryve/PodsXcode will find the package.
Set the
Dependency RuletoUp to Next Major Versionstarting from your desired version (e.g. 5.3.1), select your project underAdd to Project, and clickAdd Package.
Choose Package Products After the package is fetched, Xcode will present a list of available package products.
Select the modules you need and assign them to the appropriate target.
Click
Add Packageto confirm.

App Store Privacy Compliance Configuration
Adding a Privacy Manifest File
Starting May 1, 2024, all apps and third-party SDKs must include the use of required reason API, such as UserDefaults, in their privacy manifest file for App Store Connect approval. Follow these steps:
Create a Privacy Manifest File: Ensure your app includes a manifest file.
Specify Privacy API Types: Add
Privacy Accessed API TypesorNSPrivacyAccessedAPITypesto your file.Provide API Reasoning: Under
Privacy Accessed API Reasons, orNSPrivacyAccessedAPITypeReasons, listCA92.1in an array. More details can be found here.
Apple Health (HealthKit) project configuration
Integrate ThryveAppleHealth module
To add HealthKit to your iOS app:
Integrate
ThryveAppleHealth, along withThryveCoreandThryveCommons.Use either CocoaPods or framework files for installation.
This setup allows users to connect with Apple Health and retrieve health data automatically.
Add HealthKit to project & configure Info.plist
To be able to build your app with integrated ThryveAppleHealth module you need to:
Enable HealthKit
In Xcode: Navigate to Target → Signing & Capabilities → add (+) → HealthKit.
For Background Sync feature to work, ensure Background Delivery is enabled.

Update your app's
info.plist
Garmin Companion SDK access
The ThryveGarminCompanion module builds on the Garmin Companion SDK, which Garmin distributes as a Swift package from its own private repository. Thryve does not redistribute it, so your project fetches it from Garmin directly. This is only required for Garmin Companion integration.
Store your Garmin credentials in the keychain Xcode needs the GitHub token to download the framework attached to the Garmin release, not only to clone the repository. Run the following in a terminal, then restart Xcode:
Add your GitHub account to Xcode
Xcode > Settings… > Accounts, add an account with the plus (+) button, choose GitHub and sign in with the account Garmin granted access to.Add the package In
File > Add Package Dependencies…, enter the Garmin package URL, select the version matching your Thryve SDK release, and add theCompanionlibrary to your app target.
Your garminGithubUsername and garminGithubToken are provided by Thryve on request, together with the Garmin Companion license string for your bundle ID. See Garmin Health Companion.
Last updated

