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

@situm/react-native

v3.11.2

Published

Set of utilities that allow any developer to build React Native location based apps using Situm's indoor positioning system.

Downloads

764

Readme

Set of utilities that allow any developer to build React Native location based apps using Situm's indoor positioning system.

License: MIT Latest version: Node compatibility: TypeScript React Native

Introduction

Situm React Native Plugin is a set of utilities that allow any developer to build React Native location based apps using Situm's indoor positioning system.

This plugin has two parts:

  • The base SDK, the building blocks that allow you to:

    • obtain information related to buildings where Situm's positioning system is already configured: floorplans, points of interest, geotriggered events, etc.
    • retrieve the location of the smartphone inside these buildings (position, orientation, and floor where the smartphone is).
    • compute a route from a point A (e.g. where the smartphone is) to a point B (e.g. any point of interest within the building).
    • trigger notifications when the user enters a certain area.
  • A full featured and easy to integrate React Native component that allows you to:

    • show your cartography on a map
    • show the user location on the map
    • calculate point-to-point wayfinging routes
    • explore points of interest on your buildings on the map

Preview of WYF module

Getting started

There is a comprehensive tutorial on how to set-up a new application using this plugin on the Situm documentation page.

Below you will find the basic steps to install and configure the plugin on your React Native project. These steps have already been done for you in the example application of this repository, but they are required for other projects.

Running the example

Check the example/README file of this repository to create your first React Native application using Situm React Native. In this example app you will find example screens for each method the plugin exposes.

Configure the plugin on your React Native project

Install the plugin

Firstly you need to setup react-native development environment. To get started please follow instructions under section React Native CLI Quickstart on this guide.

To add the Situm dependency to your React Native project, you can use the yarn or npm command. To add this dependency to your project, you can use the following command in your terminal:

yarn add @situm/react-native react-native-webview react-native-permissions

#OR

npm install --save @situm/react-native react-native-webview react-native-permissions

Set up your Situm credentials

Create a new situm.tsx file with your Situm credentials. You can use the contents of example/src/situm.tsx as example.

Follow the Wayfinding guide if you haven't set up a Situm account.

Android

  1. Add the ACCESS_FINE_LOCATION permission to your AndroidManifest.xml file if you have configured Situm SDK to use GPS:
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  1. Set the minSdkVersion to 21 or later on your app's build.gradle file.

iOS

  1. Add depedency in PodFile
  target 'YourApp' do

    pod 'ReactNativeSitumPlugin', :path => '../node_modules/@situm/react-native/ReactNativeSitumPlugin.podspec'

  end

You may need to add a Header Search Path: (screenshot)

  $(SRCROOT)/../node_modules/@situm/react-native/lib/ios
  1. Declare the following permissions in your app's Info.plist file to successfully start positioning:
<key>NSLocationWhenInUseUsageDescription</key>
<string>Location is required to find out where you are</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location is required to find out where you are</string>
<key>NSMotionUsageDescription</key>
<string>We use your phone sensors (giroscope, accelerometer and altimeter) to improve location quality</string>
  1. For offline support you will have to add the underlying web application's domain inside the entry WKAppBoundDomains on Info.plist as follows:
<key>WKAppBoundDomains</key>
<array>
  <string>map-viewer.situm.com</string>
</array>

Migrate from the old Situm React Native Wayfinding plugin

The new Situm React Native package breaks compatibility with the previous Situm React Native Wayfinding plugin. Integrating the new version is simpler and more straightforward. If you want to migrate your application, follow the steps described in the Situm documentation.

Development

Run the tests

yarn test

Situm-React-Native-Plugin is licensed under MIT License

Build the library

yarn run prepare

This will also generate the docs (see next section). More info is available at our Developers Page.

Build the documentation

yarn run doc

Docs will be available in the docs/ folder.

Release version

yarn run prepare
npm pack
npm publish

or for beta channel

npm publish --tag beta

Versioning

Please refer to CHANGELOG.md for a list of notable changes for each version of the plugin.

You can also see the tags on this repository.

Submitting contributions

You will need to sign a Contributor License Agreement (CLA) before making a submission. Learn more here.

License

This project is licensed under the MIT - see the LICENSE file for further details.

More information

More info is available at our Developers Page.

Support information

For any question or bug report, please send an email to [email protected]