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-wikitude

v2.0.4

Published

Bridge between Wikitude and React Native

Downloads

11

Readme

React Native Wikitude Bridge

Introduction

This is a React Native bridge module for Wikitude which provides a simple integration to the Wikitude AR SDK. At the moment, the module only supports loading AR experiences from Wikitude Studio URLs. These can be local or online locations. You would normally export the files from Wikitude Studio and then host them in a directory somewhere yourself. Point your app to that URL and it should load your project.

How to install

First install the module via npm and link it up:

npm install react-native-wikitude

react-native link react-native-wikitude

After that completes, you will need to do additional steps for each platform you are supporting:

Android

  1. Unfortunately the gradle system does not seem to allow sub-linking aar files. To get around this you will have to install the wikitudesdk folder manually into each project you plan to use this module with.

    Copy the wikitudesdk folder from the node-modules/react-native-wikitude/android folder into your project's android folder:

    On Mac / Linux:

    cd YourReactNativeProject
    cp -R ./node_modules/react-native-wikitude/android/wikitudesdk ./android/wikitudesdk

    or on Windows:

    cd YourReactNativeProject
    xcopy node_modules\react-native-wikitude\android\wikitudesdk android\wikitudesdk /E
  2. And then in your android/settings.gradle file, modify the existing include ':react-native-wikitude' line to also include the wikitudesdk:

    include ':wikitudesdk', ':react-native-wikitude'
  3. In your android/build.gradle file, modify the minimum SDK version to at least version 19:

    android {
    	defaultConfig {
    		...
    		minSdkVersion 19
    		...
    	}
  4. In your android/app/src/main/AndroidManifest.xml file, If you have it, remove the android:allowBackup="false" attribute from the application node. If you want to set allowBackup, follow the method here.

  5. Optionally: In your android/build.gradle file, define the versions of the standard libraries you'd like WikitudeBridge to use:

    ...
    ext {
    	// dependency versions
    	compileSdkVersion = "<Your compile SDK version>" // default: 27
    	buildToolsVersion = "<Your build tools version>" // default: "27.0.3"
    	targetSdkVersion = "<Your target SDK version>" // default: 27
    	constraintLayoutVersion = "<Your com.android.support.constraint:constraint-layout version>" //default "1.0.2"
    }
    ...

iOS

At the moment, iOS integration is not documented. Please contribute to update me!

Usage

The module exposes just one function:

function startAR(architectWorldURL: string, hasGeolocation:boolean, hasImageRecognition:boolean, hasInstantTracking:boolean, wikitudeSDKKey:string)

This function will open a new Wikitude view on top of your current view and open the specified URL.

import Wikitude from 'react-native-wikitude';

const onButtonPress = () =>
{
	Wikitude.startAR('https://yourserver.com/yourwikitudestudioproject/', true, true, true, "YourSDKKey")
};

ChangeLog

  • 2.0.4 Minor Gradle file issue fixed.

  • 2.0.3 Keep screen on in Android

  • 2.0.2 Fixed errors, added SDK Key field

  • 2.0.1 Fixed android build process

  • 2.0.0 First Commit