Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
customerio-reactnative
Advanced tools
Official Customer.io SDK using React Native. Track customers and send messages to your iOS/Android apps.
This is the official Customer.io SDK for React Native.
You'll find our complete SDK documentation at https://customer.io/docs/sdk/react-native. This readme only contains basic information to help you install and initialize the SDK.
Open your terminal and run npm install customerio-reactnative
Add iOS dependencies to your project by going to the iOS subfolder and running pod install
.
Make sure your deployment target is set to at least 13.0. Before you perform this step, you may want to update your podfile to support APNs and/or FCM push notifications and rich push respectively.
For Android, include google-services-plugin by adding the following lines to the project-level android/build.gradle
file:
buildscript {
repositories {
// Add this line if it isn't already in your build file:
google() // Google's Maven repository
}
dependencies {
// Add this line:
classpath 'com.google.gms:google-services:<version-here>' // Google Services plugin
}
}
allprojects {
repositories {
// Add this line if it isn't already in your build file:
google() // Google's Maven repository
}
}
Add the following line to android/app/build.gradle
:
apply plugin: 'com.google.gms.google-services' // Google Services plugin
Download google-services.json
from your Firebase project and copy the file to android/app/google-services.json
.
Return to the main folder and run your application:
npx react-native run-ios
npx react-native run-android
Add an import statement to your project for the react native library. We haven't included it below, but you can import CioLogLevel
to set log outputs to something other than error
; this may help you debug your application.
import { CustomerIO, CustomerioConfig, CustomerIOEnv, CioLogLevel, Region } from 'customerio-reactnative';
In useEffect
, initialize the package with your CustomerioConfig
options and CustomerIOEnv
variables. You can find your Site ID and API Key credentials—or create new ones—under Data & Integrations > Integrations > Customer.io API:
useEffect(() => {
const data = new CustomerioConfig()
data.logLevel = CioLogLevel.debug
// In-app messages are optional and disabled by default
// To enable in-app messages, set enableInApp to true
data.enableInApp = true
const env = new CustomerIOEnv()
env.siteId = Env.siteId
env.apiKey = Env.apiKey
// Region is optional, defaults to Region.US. Use Region.EU for EU-based workspaces.
env.region = Region.US
CustomerIO.initialize(env, data)
}, [])
See our complete SDK documentation at https://customer.io/docs/sdk/react-native/
Thanks for taking an interest in our project! We welcome your contributions. Check out our development instructions to get your environment set up and start contributing.
We value an open, welcoming, diverse, inclusive, and healthy community for this project. We expect all contributors to follow our code of conduct.
FAQs
Official Customer.io SDK using React Native. Track customers and send messages to your iOS/Android apps.
The npm package customerio-reactnative receives a total of 12,998 weekly downloads. As such, customerio-reactnative popularity was classified as popular.
We found that customerio-reactnative demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.