npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@leanplum/react-native-sdk

v2.3.0

Published

Mobile Marketing Platform. Integrated. ROI Engine.

Downloads

11,108

Readme

@leanplum/react-native-sdk

If you have already installed Node on your system, make sure it is Node 8.3 or newer.

Getting started using npm registry

Inside the React Native App

  1. $ yarn add @leanplum/react-native-sdk or $ npm install @leanplum/react-native-sdk

Autolinking

If you are using ReactNative 0.60 or greater, autolinking is supported by default. On Android gradle will take care of dependencies, for iOS only one command needs to be run to pull dependencies

$ cd ios && pod install

Manual linking

If you are using ReactNative without support for autolinking (versions before 0.60) than you'll have to link manually by executing:

$ npx react-native link @leanplum/react-native-sdk

and running pod install for iOS

$ cd ios && pod install

Documentation

Please refer to https://docs.leanplum.com/reference#leanplum-sdk-setup for iOS or Android configuration and more usages

Usage

import {Leanplum, LeanplumInbox} from '@leanplum/react-native-sdk';



// enable the below line only for development
// Leanplum.setAppIdForDevelopmentMode('APP_ID', 'DEVELOPMENT_KEY');

// use this in production
Leanplum.setAppIdForProductionMode('APP_ID', 'PRODUCTION_KEY');

Leanplum.start();
const inbox = await LeanplumInbox.inbox();

Expo installation

This package cannot be used in the "Expo Go" app because it requires custom native code.

First install the package with yarn, npm, or expo install.

expo install @leanplum/react-native-sdk After installing this npm package, add the config plugin to the plugins array of your app.json or app.config.js:

{ "expo": { "plugins": ["@leanplum/react-native-sdk"] } } Next, rebuild your app as described in the "Adding custom native code" guide.

Local development

  1. Install yarn global: $ npm install -g yarn

  2. Install dependencies for generating builds: $ yarn install

  3. Change version string from package.json to your <custom-version>

  4. Build the sdk and publish it for local development purposes: $ yarn local-publish

  5. Add your custom build to your app repository: $ npx yalc add @leanplum/react-native-sdk@<custom-version>

Do not forget to change <custom-version> to your desired version.

Support

Reach out directly to Leanplum support team if you have any usage questions or feature requests. Open an issue if you want to report a bug or need code-level support.