arrow-rightThryve SDK 4.x to 5.x migration

This page covers migrations from previous to latest versions.

In version 5.0.0, the Thryve SDK introduced major changes to its architecture. If your application was built using Thryve SDK 4.x.x, ensure to complete the actions listed in the following sections to have a smooth migration of your Thryve implementation in your application to Thryve SDK 5.0.0.

Core changes

The 5.0 update introduces a ThryveSDK singleton, streamlining access to the SDK's functionality. This unified interface simplifies interactions by encapsulating all internal mechanisms.

CoreConnector is now ThryveSDK

In version 5.0.0, ThryveSDK replaces CoreConnector. As a singleton, ThryveSDK it consolidates the functionalities of CoreConnector . Initializing CoreConnector is now obsolete.

Initialize the SDK using:

ThryveSDK.getOrCreate

Centralized (module) configuration

All configuration options provided to developers are within the ThryveSDKConfig object. See documentation for further information.

Accessing (module) functions

All module functions, like those from ThryveAppleHealth or ThryveHealthConnect, are now accessed through:

ThryveSDK.get

Automated User Creation with Thryve SDK

In Thryve SDK 4.x, developers needed to call getAccessToken to create or fetch users. This process is now automated during SDK initialization. To obtain the endUserId (previously accessToken) for backend operations, use the new getEndUserId method.

Thryve Connection Widget replaces the former screen provided via dataSourceUrl

With the release of Thryve SDK 5.0.0, we've introduced the new ThryveDataSourceConnectionWidget. This widget empowers your users to easily connect and disconnect all enabled data sources for your application, eliminating the need for you to implement additional views or logic - the Thryve SDK takes all care.

Thryve Connection Widget makes it super simple to allow users to connect theiir data sources

Unlike the previous screen provided via dataSourceURL, the ThryveDataSourceConnectionWidget now supports native data sources such as Apple Health, Health Connect, and Samsung Health, provided the necessary modules are added and configured in your application.

Plattform-specific changes

ModuleAppleHealth is now ThryveAppleHealth

The Apple Health module of the Thryve iOS SDK was previously named ModuleAppleHealth and has been renamed to ThryveAppleHealth . All imports and references to ModuleAppleHealth should be changed to ThryveAppleHealth .

HKConnector initialization is obsolete

The manual initialization of HKConnector is no longer required in 5.0.0. ThryveSDK singleton handles all the internal mechanisms of HKConnector .

Adapted naming of keywords and variables

With the introduction of Thryve SDK 5.0.0, we have renamed certain keywords and variables to improve clarity. Parameters will be aligned with webhooks and Thryve backend API with the release of next API version. (coming in August)

Previous Variable/Parameter
Current Variable/Keyword
Description

appId

authId

Credentials to authorize your app with the Thryve SDK.

appSecret

authSecret

Credentials to authorize your app with the Thryve SDK.

partnerUserID

endUserAlias

Alias for Thryve user that can be set optionally by you. Make sure to set a secure, non-predictable, unique identifier without personal identifiable information to keep Thryve data pseudonomous.

accessToken/authenticationToken

endUserId

Unique identifier of Thryve user automatically generated by Thryve backend. All data saved with Thryve is linked to this endUserId. It is also used to specify the user you request data for with Thryve's API.

language

locale

The language code following ISO 639-1arrow-up-right to set the language that will be used on UI elements, e.g. the Thryve Widget.

Last updated