Getting Started

Requirements

iOS

  • Xcode 11 and iOS SDK 13
  • iOS 9.0+ target deployment
  • Valid architectures: armv7, armv7s, arm64 devices and i386, x86_64 simulators

Android

Minimum Android SDK version - 19.


Installing the module

  1. Install the module with npm:

    npm install react-native-synerise-sdk --save
    
  2. If you are using React Native >= 0.60, install the native dependencies by using CocoaPods from your ios directory:

    pod install
    
  3. If you are using React Native < 0.60, perform the following actions:

    1. link the native dependency:

      react-native link react-native-synerise-sdk
      
    2. Install from your ios directory:

      pod install --repo-update
      

Setting up iOS

Note: Starting from React Native 0.60, CocoaPods is now the default integration approach for React Native iOS projects.
  1. In your ios/Podfile, add the following dependency: pod 'react-native-synerise-sdk', :path => '../node_modules/react-native-synerise-sdk'
    Result:
    Your Podfile should now look like this:

    target 'YourTarget' do
        
    # Pods for your target
    pod 'React', :path => '../node_modules/react-native/'
    pod 'React-Core', :path => '../node_modules/react-native/React'
    # ... other React dependencies
           
    # Add react-native-synerise-sdk
    pod 'react-native-synerise-sdk', :path => '../node_modules/react-native-synerise-sdk'
           
    use_native_modules!
        
    end
    
  2. From your ios directory, run pod install

If you prefer linking manually, check React Native - Linking Libraries to link your libraries that contain native code.

Setting up Android

  1. In your app’s build.gradle file, add the following dependency: implementation 'com.synerise.sdk.react:react-native-synerise-sdk:0.9.0'

  2. In the app’s main class, add RNSyneriseSdkPackage to your list of packages:

@Override
protected List<ReactPackage> getPackages() {
	@SuppressWarnings("UnnecessaryLocalVariable")
	List<ReactPackage> packages = new PackageList(this).getPackages();
	packages.add(new RNSyneriseSdkPackage(getApplication()));

	return packages;
}

Importing Synerise SDK

import { Synerise } from 'react-native-synerise-sdk';

Initializing Synerise SDK

Synerise.Initializer()
	.withClientApiKey('YOUR_CLIENT_API_KEY')
	.withDebugModeEnabled(true)
	.withCrashHandlingEnabled(true)
	.init();
😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.