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

@rznet/rz-gamespace-sdk-react-native

v0.6.2

Published

Gamespace SDK for RN

Downloads

1,224

Readme

This is Ring Zero's react-native SDK for Gamespace @rznet/rz-gamespace-sdk-react-native.

Getting Started

Note: Make sure you install all required dependencies and setup Google Admob and Appodeal SDK to implement the SDK in your React-Native app.

Step 1: Install dependencies

Install Required Dependencies

First you need to install all dependcies that the SDK make use of. Below are the list of dependencies - (You may skip those that you have already installed)

{
	"@react-native-async-storage/async-storage": "^1.21.0",
  "@react-native-community/netinfo": "^11.1.1",
  "@react-navigation/bottom-tabs": "^6.5.9",
  "@react-navigation/native": "^6.1.8",
  "@react-navigation/stack": "^6.3.18",
  "@reduxjs/toolkit",
  "axios": "^1.5.1",
  "dayjs": "^1.11.10",
  "react": "18.2.0",
  "react-native": "0.73.1",
  "react-native-animatable": "^1.3.3",
  "react-native-config": "^1.5.1",
  "react-native-device-info": "^10.11.0",
  "react-native-encrypted-storage": "^4.0.3",
  "react-native-gesture-handler": "^2.13.4",
  "react-native-google-mobile-ads": "^12.3.0",
  "react-native-localize": "^3.0.3",
  "react-native-progress": "^5.0.1",
  "react-native-responsive-fontsize": "^0.5.1",
  "react-native-safe-area-context": "4.6.3",
  "react-native-screens": "^3.29.0",
  "react-native-sensitive-info": "^6.0.0-alpha.9",
  "react-native-svg": "^13.14.0",
  "react-native-vector-icons": "^10.0.2",
  "react-native-video": "^5.2.1",
  "react-native-webview": "^13.6.4",
  "react-redux": "^8.1.3",
  "redux": "^4.2.1",
  "redux-persist": "^6.0.0",
  "redux-thunk": "^2.4.2"
}

Install SDK

Then install our latest SDK

npm i @rznet/rz-gamespace-sdk-react-native

Step 2: Setup Admob and Appodeal

For Android

First go to app.json in your root projectand add this

{
  ...
  "react-native-google-mobile-ads": {
    "android_app_id": "YOUR_ADMOB_APP_ID"
  }
}

Second go to android/build.gradle and put these lines of code after buildScript

buildscript {
	...
}

allprojects {
    repositories {
	    google()
	    mavenCentral()
    }
}

apply plugin: "com.facebook.react.rootproject"

After that go to android/app/build.gradle and add these lines of code

android {
   ...
    defaultConfig {
        ...
        multiDexEnabled  true
    	...
    }
    ...
    }
    buildTypes {
      ...
    }
}
dependencies {
    ...
    implementation "com.android.support:multidex:1.0.3"
    implementation 'com.google.android.gms:play-services-ads:22.5.0'
   	...
}

Finally inside Android.xml file inside android/app/src/main/Android.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    ...
    <application
     ...
      android:allowBackup="true"
      ...
	  >
      ...
       <meta-data
          android:name="com.google.android.gms.ads.APPLICATION_ID"
          android:value="YOUR_ADMOB_APP_ID" />
    </application>
</manifest>

For iOS

iOS version for the SDK is not supported for now.

Step 3: Setting up config and fonts

Config

you may configure how to use react-native-config as you like but you have to put your AWS access keys to your .env

AWS_ACCESS_KEY_ID="************"
AWS_ACCESS_SECRET="************************"

You also have to add

GS_APP_CONFIG="development"

to configure how you want to initialize appodeal ( development === testing )

Fonts

Put Bungee-Regular.otf and Bungee-Regular.ttf inside your fonts folder and than run

npx react-native-asset

Step 4 Component Integration

If it is from stampee app you need to pass user token to login as stampee user, otherwise you don't need to pass it.

<RZGamespace
backendURL={YOUR_API_URL}
accessKey="*******************"
platformId="******-****-****-****-******"
admobRewardedAdUnitId="******-****-****-****-******"
stampeeUserToken={token}
ref={gsRef}
navigateBack={handleGoBackPress}
/>

You can ref the component to access rzLogout() function from Gamespace.

const gsRef = useRef<RZGameSpaceRef>(null); //gsRef?.current.rzLogout();

Stampee only

You can aslo pass callback function to navigateBack to tell what the exit butto should do

  const handleGoBackPress = () => {
    navigation.navigate('Tab');
  };

Congratulations! :tada:

That's it enjoy your RZ Gamespace!