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

react-native-playbook-sdk

v1.0.5

Published

Playbook SDK Wrapper

Downloads

2

Readme

Installation

Installation

npm install react-native-playbook-sdk

Initialize PlaybookSDK

Initialize Playbook SDK with your settings information and open the Playbook Modal from any component. Here you'll need 3 critical information - your SDK Token, an ID for your user (given by you) and the user group(s) the user belongs to.

In your application main component useEffect hook you can setup playbook SDK with following code blocks:

import PlaybookSdk from 'react-native-playbook-sdk';

const Application = ()=>{
    ...
    useEffect(()=>{            
            /**
             Playbook Config
            */
            PlaybookSdk.set(
                "...", // Your SDK token from app.getplaybook.io -> Settings -> App Settings
                "...", // A unique user id of your user
                ["..."], // An array of user group ids from app.getplaybook.io -> User Groups -> External ID, External ID = 1 is for the Everyone User group
                "Acme Academy", // Your Company Name
                true // Sandbox
            )
            
            /* This method is optional */
            PlaybookSdk.extraSettings({
                spinnerColor: "#FF0000",
                mainColor: "#FF0000",
                mainTitle: {
                    "en": "Acme Academy",
                    "tr": "Acme Akademi"
                },
                mainDescriptionText: {
                    "en": "Supercharge your skills with these short guides in various categories.",
                    "tr": "Çeşitli konu ve kategorilerdeki kısa rehberler ile kendini geliştir."
                }
                QRModule: true, 
                updateModule: true
            ))
    }, [])
    ...
}

Posible properties of extra settings

Prop | Description | Type | default ------ | ------ | ------ | ------ spinnerColor | Color of main loading spinner (hex format) | String | #333333 fontFamily | Family name of main font | String | null mainColor | Application main color (hex format) | String | #333333 mainTitle | Title of main screen | {[key:String]: String} | null mainDescriptionText | Description of main screen | {[key:String]: String} | null categoryDescriptionText | Description of main screen | {[key:String]: String} | null QRModule | State of QRModule | boolean | true updatesModule | State of Update Module | boolean | true

Locale Your SDK

First of all you should set available languages as shown code block below for the SDK.

    PlaybookSDK.setAvailableLangs([
        "EN",
        "DE",
        "TR"
    ])

Current version of the SDK has localizations for only English, Turkish and Arabic. But developers can create their localization files from the current JSON template. The example template can be found the main dir of the repository.

Please follow the three basic step in native SDKs documentations to localize the sdk for a new language.

iOS Playbook SDK

Android Playbook SDK

Presenting Academy, Updates or both

In Playbook you can choose to display the main modules (Academy & Updates) separately at different places, or together. In any UIViewController instance you can use methods listed below.

    // Presenting both academy and updates module
    PlaybookSDK.showListView(true)
    // Presenting only update module
    PlaybookSDK.showListView(true)
    // Presenting only academy module
    PlaybookSDK.showListView(true)

Remote notification for updates

Notifications to your app sent for the Playbook SDK should have an pb_update_id in the payload section.

  "data": {
    "pb_update_id": "PU69a1" // Update ID from app.getplaybook.io -> Updates -> Campaign ID
  }

You can find detailed notification setup from native documentation of SDKs.

iOS Playbook SDK

Android Playbook SDK

License

Commercial