Skip to content

onewelcome/sdk-react-native

Repository files navigation

onewelcome-react-native-sdk

This is a wrapper for the OneWelcome native Android and iOS SDK's to work with ReactNative. For more information please refer to our documentation For additional reference, see our example application.

Prerequisites

Refer to our Requirements overview

SDK Configuration

For setting up the SDK in your application, please refer to our configuration docs.

Local Development of SDK

The SDK can be developed locally using the example app. React Native does not support symlinking with dependencies in the node_modules folder because of the metro bundler see issue.

In order to develop the sdk you can use an npm package called yalc

This package allows us to set up a local npm repository to publish our SDK to. To get started, install yalc following their instructions.

In the SDK folder run: yalc publish

In the example app folder run yalc add @onewelcome/react-native-sdk

After making changes to the SDK you can run yalc publish --push. This will automatically update the dependency in the example app aswell.

For iOS there is an alternative. In your Podfile above config = use_native_modules! you can add the following code and run pod install. Note that this will only work for iOS files and not for the Typescript files.

pod 'onewelcome-react-native-sdk', :path => '../../onewelcome-react-native-sdk'