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

v3.0.6

Published

React-Native version of OkayCam

Readme

react-native-okaycam

Requirements

Android

  • minSdkVersion >= 30

iOS

  • iOS 15+
  • Swift 5

Getting started

$ yarn add [email protected]

Android

  1. Navigate to android folder
  2. Add following snippet in the root build.gradle file:
allprojects {
    repositories {
        maven {
            url "https://innov8tif-okaycam.firebaseapp.com"
            content {
                includeGroup "com.innov8tif.xendity"
            }
        }
    }
}
  1. Sync gradle

iOS

  1. Navigate to ios folder
  2. Add the following code to Podfile
platform :ios, '15.0'
use_frameworks!

post_install do |installer|
    installer.pods_project.targets.each do |target|
      	if (target.name&.eql?('FBReactNativeSpec'))
            target.build_phases.each do |build_phase|
                if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
                    target.build_phases.move(build_phase, 0)
          	end
            end
      	end
      	target.build_configurations.each do |config|
        	config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
        	config.build_settings["ONLY_ACTIVE_ARCH"] = "NO"
            if target.name == "CryptoSwift"
                puts "Enable module stability for CryptoSwift"
                config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
            end

            if target.name == 'fmt'
                puts "Enable module stability for fmt"
                config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
            end
      	end
    end
end
  1. Run command pod install

  2. Add camera permission

Android Issue

Duplicate class org.hamcrest.xxx

If you encouter the errors above, you may exclude junit module.

configurations { compile.exclude group: "junit", module: "junit" }

iOS Issue

Undefined symbol: _swift_FORCE_LOAD$_swiftUniformTypeIdentifiers

Undefined symbol: _swift_FORCE_LOAD$_swiftCoreMIDI

If you encouter the errors above, you may create a new swift file called Void.swift without adding bridging header.

License

Apply licenses for Android and iOS SDKs

const license = Platform.select({
    android: "",
    ios: ""
})

OkayCam Document

Configuration

| - | Property name | Description | Default value | | ----------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | | width | width to resize the image | 2000 | | | imageQuality | quality of cropped image | 1.0f | | | New autoCapture | When set to true, the system will automatically capture the document once it is properly detected and aligned. When set to false, the user must manually trigger the capture instead. | true | | New mode | FULL | Captures front of document, front of document with flash, and back of document automatically. This is the default mode for complete document capture. | ✅ | | | FRONT_ONLY | Captures only the front of document. | ❌ | | | FRONT_BACK | Captures both front and back of document automatically without flash. | ❌ | | | FRONT_WITH_FLASH | Captures the front of document with flash enabled | ❌ |

Usage

import { captureDocument, DocumentCaptureMode } from "react-native-okaycam"

  captureDocument(license, false, {
      width: 2000,
      imageQuality: 0.8,
      mode: DocumentCaptureMode.FULL,
    })
      .then(result => {
        console.log(JSON.stringify(result));
      })
      .catch(error => {
        console.log(JSON.stringify(error));
      });

Result

| Result | Description | | ------------------ | ------------------------------ | | fullDocumentImage | Result of first photo | | fullDocumentImage2 | Result of first photo cropped | | fullDocumentImage3 | Result of second photo | | fullDocumentImage4 | Result of second photo cropped |

OkayCam Selfie

Configuration

| - | Property name | Description | Default value | | ---------------- | ------------------- | ----------------------------------------------------- | --------------------------------------- | | | width | width to resize the image | null | | - | imageQuality | quality of image | 1.0 (range from 0.0 to 1.0) | | topLabel | text | text of the top label | Please align your face within the frame | | topLabel | color | color of the top label | #FFFFFF | | topLabel | size | text size of the top label | 24 | | - | bottomFrameColor | color of the bottom frame | #EB6709 | | switchBtnConfig | color | color of the switch button | #FFFFFF | | switchBtnConfig | show | show or hide the camera switch button | true | | confirmBtnConfig | backgroundColor | background color of the confirm button | #ffa500 | | confirmBtnConfig | contentColor | content color of the confirm button | #ffffff | | retakeBtnConfig | backgroundColor | background color of the retake button | #ffa500 | | retakeBtnConfig | contentColor | content color of the retake button | #ffffff | | - | captureBtnColor | color of the capture button | #FFFFFF | | - | defaultCameraFacing | initial camera facing when the selfie cam is launched | CameraFacing.FRONT |

Usage

import { captureSelfie } from "react-native-okaycam"

captureSelfie(
	license,
	{
		topLabel: {
			text: "Align you face within the frame",
			color: "#4287f5",
			size: 20
		},
		bottomFrameColor: "#4287f5",
		captureBtnColor: "#ffffff",
		switchBtnConfig: {
			color: "#ffffff",
			show: true
		},
        confirmBtnConfig: {
            backgroundColor: "#4287f5",
            contentColor: "#000000"
        },
        retakeBtnConfig: {
            backgroundColor: "#4287f5",
            contentColor: "#000000"
        },
		defaultCameraFacing: "front",
		width: 1000,
        imageQuality: 1.0
	}
)
	.then(result => {
		console.log(result)
	})
	.catch(error => {
		console.log(error)
	})

Result

| Result | Description | | ----------- | --------------------- | | selfieImage | Captured selfie image |

Error Codes

| Error | Description | | ------------------------ | ------------------------------------------------------------------------ | | invalid license | The license is invalid | | camera permission denied | The use did not grant the permission to access camera in order to do OCR | | cancel | The user canceled during the scanning process |