VerifyAI React Native SDK

@switchlabs/verify-ai-react-native gives your app a useVerifyAI hook, a drop-in camera scanner with retry guidance, an offline queue, and a guided vehicle inspection screen. Works with Expo and bare React Native.

Quick Start

1. Install

bash
npm install @switchlabs/verify-ai-react-native

# For the camera scanner:
npx expo install expo-camera expo-image-manipulator expo-sensors

2. Use

tsx
import { useVerifyAI } from '@switchlabs/verify-ai-react-native';
import { VerifyAIScanner } from '@switchlabs/verify-ai-react-native/scanner';

export function ParkingPhoto({ onDone }: { onDone: () => void }) {
  const { verify } = useVerifyAI({ apiKey: process.env.EXPO_PUBLIC_VERIFY_AI_KEY! });

  return (
    <VerifyAIScanner
      policy="scooter_parking"
      onCapture={(base64) => verify({ image: base64, policy: 'scooter_parking' })}
      onResult={(result) => {
        if (result.is_compliant) onDone();
        else console.log(result.feedback, result.violation_reasons);
      }}
    />
  );
}

Features

Native Camera UI

Pre-built camera overlay with real-time guidance for optimal photo capture. Customizable themes and branding.

On-Device AI

AI processing happens on the user's device. Sub-200ms latency with no cloud round-trips required.

Offline Support

Full verification works without internet. Results queue and sync automatically when connection returns.

TypeScript Support

Full TypeScript definitions included. Autocomplete and type checking for all API methods.

Hooks API

React hooks-based API (useVerifyAI) for clean integration with functional components.

Expo Compatible

Works with both bare React Native and Expo managed workflow projects.

Code Examples

Requirements

  • React Native 0.72 or higher
  • Expo SDK 51+ / expo-camera 15+ for the scanner (core client has no Expo dependency)
  • Camera permission configured in app
  • VerifyAI API key (free sandbox available)
  • SDK 2.9.0 or later for guided vehicle inspections

Frequently Asked Questions

Start Building with React Native

Get your free API key and integrate VerifyAI in minutes.

Other ways to integrate

Mobile SDKs, server-side HTTP examples, the REST API, webhooks, and no-code automation platforms.

What do you need to verify?

Tell us about the evidence, the decision and the workflow around it.

Discuss your workflow