# searchSDK for React Native

React Native · iOS 15.1+ · Android API 24+. Normalized search through your application's HTTPS gateway.

Canonical: https://searchsdk.dev/docs/sdks/react-native
Markdown: https://searchsdk.dev/docs/sdks/react-native.md

<a id="install"></a>

## Install from source

Package: `@belweave/search-sdk-react-native`, version `0.1.0-alpha.0`. This is an alpha source/local-artifact installation. No public registry release or release tag is assumed.

**Get the source**

```bash
git clone https://github.com/Belweave/searchSDK.git
cd searchSDK
# Record this revision with your application's dependency lock.
git rev-parse HEAD
```

**Build or install the local package**

```bash
nvm use
npm ci
npm run build -w @belweave/search-sdk-react-native
npm pack -w @belweave/search-sdk-react-native

# In your React Native app:
npm install /absolute/path/searchSDK/belweave-search-sdk-react-native-0.1.0-alpha.0.tgz
# Then install iOS pods and rebuild the native app.
```

The npm artifact includes autolinked URLSession and OkHttp bridges. In your app's ios directory, run bundle exec pod install. JavaScript-only reloads do not install native modules. Broader declared peer compatibility is not a complete runtime test matrix.

<a id="first-search"></a>

## Call your application gateway

First deploy an [application-owned gateway](https://searchsdk.dev/docs/guides/application-gateway). searchsdk.dev hosts a demonstration playground and documentation MCP service; neither is an application gateway for these SDKs.

**search.ts**

```typescript
import { createSearchClient } from '@belweave/search-sdk-react-native';

export async function searchExample(
  endpoint: string,
  accessToken: () => Promise<string>,
  signal: AbortSignal,
) {
  const search = createSearchClient({ endpoint, accessToken, timeoutMs: 10_000 });
  return search.web.search({
    query: 'SQLite write concurrency', limit: 3,
  }, { signal });
}
```

Your app supplies an HTTPS gateway URL, its session callback and an AbortSignal tied to screen lifecycle. The callback returns an application token, never a provider key. Reuse the configured client in a real service module.

<a id="scope"></a>

## Supported surface and limits

Normalized search through your application's HTTPS gateway.

- No direct providers or automatic gateway POST retries.
- A compiled native bridge is required. Ambient native fetch is not used as an insecure fallback.

Preserve result order, provider-native scores and source provenance. Unknown usage is not zero cost. Cancellation and deadlines cannot undo a request already accepted by a remote system or guarantee exactly-once effects.

<a id="verify"></a>

## Verify without provider keys

**Repository checkout · local checks**

```bash
npm run test:mobile
npm run test:package -w @belweave/search-sdk-react-native
```

187 JavaScript tests, native transport tests and nine installed release-app cases each on iOS and Android with React Native 0.86.3.

These are deterministic contract and artifact checks. They do not establish live-provider or account-entitlement verification. Read the package README for precise commands, dependencies and runtime coverage.

<a id="next"></a>

## Continue in your language

- [React Native package reference](https://github.com/Belweave/searchSDK/tree/main/packages/react-native#readme): Complete API, errors, streaming, packaging and platform boundaries.
- [Compare SDKs](https://searchsdk.dev/docs/sdks)
- [Gateway protocol and authorization](https://searchsdk.dev/docs/guides/application-gateway)
