Last modified October 6, 2021 by Shelly Wolfe

React Native SDK upgrade guide

This guide provides information about how you can upgrade to the latest Swrve React Native SDK Plugin. For information about the changes that have been made in each React Native SDK release, see React Native SDK release notes.

To upgrade to the latest version of the Swrve React Native SDK plugin, replace the react-native-swrve-plugin folder in your project with the one found in latest release on GitHub. Or use the following command:

npm update react-native-swrve-plugin

When you add the updated folder, we recommend clearing your node_modules folder and perform an npm install to ensure you have the latest changes. Also, if you’re using iOS, ensure you run pod update in the ios folder.


Version 2.0.0

Changed To
swrveConfig.managedModeAutoStartLastUser (native code) swrveConfig.autoStartLastUser
Removed Summary
Install action from the in-app listeners arguments. Action is no longer available in the campaign editor. Use the deeplink action instead.
Added Summary
New argument to the SwrveSDK.setListeners function for embedded campaigns. If your integration includes embedded campaigns, add the embedded listeners argument as the last item in the list. For example:

constructor(props) { 
  super(props); 
    SwrveSDK.setListeners( 
    /** User Resource Listeners arg **/ null, 
    /** push listeners arg**/ null, 
    /** in-app listeners arg **/ null, 
    /** embedded listeners arg **/ null) 
} 

 


Version 1.3.0

There are no code changes required to upgrade to Swrve React Native SDK Plugin v1.3.0.


Version 1.2.1

There are no code changes required to upgrade to Swrve React Native SDK Plugin v1.2.1.


Version 1.2.0

There are no code changes required to upgrade to Swrve React Native SDK Plugin v1.2.0.


Version 1.1.0

This section provides information for upgrading to Swrve React Native SDK Plugin v1.1.0.

Geo-triggered campaigns

To use Swrve’s geo-triggered campaigns, you must integrate the Geo SDK plugin. For more information, see the Swrve Geo SDK Guide.