SDK Installation
React Native

Get Started

12min
the cooee's react native plugin for customer engagement gives your team the power to easily integrate it into your creact native application follow these simple steps add plugin https //docs beta letscooee com/developers/cordova/get started#ye3dq install the plugin using the popular single commands in the terminal/powershell yarn yarn add @letscooee/react native npm npm install @letscooee/react native save npm/yarn will automatically pull the latest version of the plugin static libray compatibility (ios only) (required) if your react native ios application uses the flipper library, these steps are for you this plugin depends on cooeesdk which is a framework to make it compatible with the ios static library, you need to follow the below steps add below line to podfile present in ios/ folder podfile require relative ' /node modules/@letscooee/react native/scripts/cooee static pod' append the following pre install script in podfile present at ios/ folder podfile target 'application name' to pre install do |installer| setup cooee(installer) end end configure credentials android add the following in androidmanifest xml inside the application tag \<application tools\ replace="android\ name" \> \<meta data android\ name="cooee app id" android\ value="my cooee app id"/> \<! sets configuration for com google ar core > \<meta data android\ name="com google ar core" android\ value="optional" /> ios add the following snippet in the app level info plist plist \<key>cooee app id\</key> \<string>my cooee app id\</string> replace my cooee app id with the app id which is present at cooee portal permission usage android (optional) cooee sdk supports prompting the following permissions via engagement to make it work, you need to add the following to the app's androidmanifest xml file present in android/app/src/main/ folder \<! cooee sdk use this permission to run augmented reality engagements > \<uses permission android\ name="android permission camera" /> \<! cooee sdk use this permission to run location based engagements > \<uses permission android\ name="android permission access fine location" /> ios (required) cooee sdk uses a few permission if granted (we do not ask explicitly) for analysing the user this helps us to create and deliver better notifications and in apps apple requires a user friendly description of such permissions as defined here add the following permission description to app's info plist file present at ios/application name/ folder plist \<key>nslocationwheninuseusagedescription\</key> \<string>app uses location to search retailer location\</string> \<key>nsbluetoothalwaysusagedescription\</key> \<string>app uses bluetooth to find out nearby devices\</string> \<key>nscamerausagedescription\</key> \<string>need to access your camera for a better ar experience \</string> configure native code android open your mainapplication class present in and roid/app/src/main/java/your package name/ and extend it with cooeeplugin class import com letscooee cooeeplugin; public class mainapplication extends cooeeplugin implements reactapplication { }import com letscooee cooeeplugin; public class mainapplication cooeeplugin(), reactapplication { } ios open your appdelegate file from ios/app name/ and add following snippet \#import "cooeesdk/cooeesdk swift h" \ (bool)application (uiapplication )application didfinishlaunchingwithoptions (nsdictionary )launchoptions { \[appcontroller configure]; }import cooeesdk @main class appdelegate uiresponder, uiapplicationdelegate { func application( application uiapplication, didfinishlaunchingwithoptions launchoptions \[uiapplication launchoptionskey any]?) > bool { appcontroller configure() } } grab a reference import cooeereactnative from '@letscooee/react native';