SDK Integration Issue

Clients experiencing SDK issues when updating versions can try to  reinstall their project’s node modules. If you observe issues similar to the below, please check the resolution options.

  • iOS app crashing on startup due to errors related to the initialize method
  • Android build failing with an error on line 51 in the TrustArc Java module

The issue is due to caching and version resolution problems when using the “latest” version specifier in package.json. Gradle (Android) and CocoaPods (iOS) may not consistently fetch the most recent and correct version of the native SDKs when “latest” is used.

Resolution

To resolve the issue, specify an exact version in the package.json instead of “latest:”

"@trustarc/trustarc-react-native-consent-sdk": "2025.07.1"

The version lock forces Gradle and CocoaPods to fetch the specific version, ensuring consistency across builds.
 

 

To rollback to a previous version (if needed), you can specify:

"@trustarc/trustarc-react-native-consent-sdk": "2025.04.2"

Important: When updating SDK versions, we recommend to delete the node_modules folder or the specific TrustArc package:

rm -rf node_modules/@trustarc/

 

 

For iOS, we also recommend to reinstall pods to ensure the latest SDK is properly integrated:

npx pod-install

or

cd ios && pod install

 

 

For Android, we also recommend to clean and rebuild the project to ensure the latest SDK is properly integrated:

cd android && ./gradlew clean && ./gradlew build

This can be added after the iOS pod install instructions to provide complete guidance for both platforms.

 

 

For Expo:

The following command is recommended to ensure proper integration of the latest SDK:

npx expo prebuild --clean