Node Package Manager
We use NPM to manage and install the SDK package.
- At the top level of your project run
npm install @osano/osano-cmp-react-native
The SDK depends on @react-native-clipboard/clipboard (installed automatically) for the consent UUID Copy button. It is a native module, so it must be linked into your app — see the platform steps below. If it is not linked (for example in Expo Go), the drawer still works: the Copy button is hidden and the UUID text stays selectable.
iOS Native Module installation
NPM uses cocoapods to install the native iOS portion of modules. CocoaPods
- Install Cocoapods using Cocoapods - Getting Started.
- Run
pod installfrom inside the iOS folder in your project. This links both the Osano native module andRNCClipboard.
Android Native Module installation
- Run a gradle sync after
@osano/osano-cmp-react-nativehas been added to your package manager. Autolinking picks upRNCClipboardautomatically.