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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-okhi

v2.0.19

Published

The OkHi React Native library enables you to collect and verify addresses from your users

Readme

react-native-okhi

npm version license platform CI

Quick Start

1. Install

npm install react-native-okhi
# or
yarn add react-native-okhi

2. Configure native projects

Install pods:

cd ios && pod install && cd ..

Add to Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>Grant to enable creating addresses at your current location.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Grant to enable creating and verifying your addresses.</string>

Enable Background Modes in Xcode → Signing & Capabilities:

  • ✅ Location updates
  • ✅ Background fetch

Add to AppDelegate.mm:

@import OkHi;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [OK startMonitoring];
  // ... rest of your code
}

If using swift AppDelegate.swift:

import OkHi

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

  func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
  ) -> Bool {

    OK.startMonitoring() // add this
    return true
  }
}

Add OkHi Maven repository to android/build.gradle:

allprojects {
    repositories {
        maven { url "https://repo.okhi.io/artifactory/maven" }
    }
}

Add permissions to AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" android:foregroundServiceType="location" />

Note: Requires a development build. This library won't work with Expo Go.

npx expo install react-native-okhi
npx expo prebuild
npx expo run:ios  # or run:android

3. Verify an address

import * as OkHi from 'react-native-okhi';

// Step 1
await OkHi.login({
  auth: {
    branchId: 'YOUR_BRANCH_ID',
    clientKey: 'YOUR_CLIENT_KEY',
  },
  user: {
    firstName: 'John',
    lastName: 'Doe',
    phone: '+254712345678',
    email: '[email protected]',
  },
});

// Step 2
const { user, location } = await OkHi.startDigitalAddressVerification();

Full Example

import { Button, Text, View } from 'react-native';
import * as OkHi from 'react-native-okhi';

export default function Dashboard() {
  useEffect(() => {
    OkHi.login({
      auth: { branchId: 'YOUR_BRANCH_ID', clientKey: 'YOUR_CLIENT_KEY' },
      user: {
        firstName: 'John',
        lastName: 'Doe',
        phone: '+254712345678',
        email: '[email protected]',
      },
    }).then(() => console.log('user logged in'));
  }, []);

  const onButtonPress = async () => {
    const { user, location } = await OkHi.startDigitalAddressVerification();
    console.log(`started verification for: ${location.id}`);
  };

  return (
    <View style={{ flex: 1, justifyContent: 'center', padding: 20 }}>
      <Button title="Verify Address" onPress={onButtonPress} />
    </View>
  );
}

Documentation

License

MIT © OkHi