Skip to main content

ReactNative Demo

The GlamAR React Native SDK provides an easy way to embed GlamAR’s WebView-based Augmented Reality experience inside your React Native applications. It enables virtual try-on for categories like makeup, jewelry, and eyewear with:

  • Real-time AR preview
  • Face tracking and analysis
  • SKU/category application
  • Snapshot support
  • Simple React Native APIs

Features​

  • Real-time virtual try-on for multiple categories
  • Camera and image-based preview modes
  • WebView-based rendering (headless preload + visible attach)
  • Snapshot functionality

Clone the repository​

Clone the latest source from the main branch:

git clone --branch main --single-branch https://github.com/pixelbin-io/glamar-react-native.git

This repository contains the SDK source. To run the integration below, use your React Native app and complete the SDK setup.

You can follow a thorough guide click here

Prerequisites​

To follow along you should have basic knowledge of creating web apps with Javascript, React, Android or iOS and their ecosystem. In this tutorial we are going to use:

  • Create your access key in Fynd Console → your organization → GlamAR → your product account → Settings → Tokens.
  • Any valid SKU inside your Product Inventory under GlamAR.

Visit Getting Started Page if access key or SKU has not been created

Installation​

Install the latest SDK in your React Native app:

npm install @glamario/core-react-native@latest

Initialization​

In your React Native app, add or update SDK initialization as described in the setup guide, and supply your access key.

GlamAr.init({
accessKey: "Your_Access_Key", // required
});

Run Locally​

  1. In the terminal , start the Metro bundler
npx react-native start
  1. Open another terminal in parallel and run the following commands to build and run the app
    • Andorid
    npx react-native run-android
    • iOS
    npx react-native run-ios