Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 0 additions & 135 deletions content/docs/expo/installation.mdx

This file was deleted.

4 changes: 0 additions & 4 deletions content/docs/expo/meta.json

This file was deleted.

164 changes: 0 additions & 164 deletions content/docs/expo/usage.mdx

This file was deleted.

1 change: 0 additions & 1 deletion content/docs/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"android-kotlin",
"flutter",
"ionic",
"expo",
"onchain",
"zkfetch",
"ai-agent",
Expand Down
66 changes: 59 additions & 7 deletions content/docs/react-native/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,70 @@ import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
{ href: 'https://www.npmjs.com/package/@reclaimprotocol/inapp-rn-sdk', imgSrc: 'https://img.shields.io/npm/v/%40reclaimprotocol%2Finapp-rn-sdk.svg', alt: 'NPM Version' },
]} />

## Get an API Key
Setup your project using the [Get API Key guide](/api-key).

Note:
- This SDK may not be compatible with React Native [Frameworks](https://reactnative.dev/architecture/glossary#react-native-framework) like Expo.
- To learn more about React Native apps without a framework, refer to the [React Native documentation](https://reactnative.dev/docs/getting-started-without-a-framework).

## Example
# Using Expo
## Installation

```package-install
npx expo install @reclaimprotocol/inapp-rn-sdk
```

## Setup

Expo users can skip the native configuration changes by adding the Reclaim InApp Config Plugin. To do so merge the following code to the plugins section of your `app.json`, `app.config.js`, or `app.config.ts` file:

```diff
{
// .. other plugin options (removed for brevity)
"plugins": [
"expo-router",
// Add the following in the plugins section:
+ "@reclaimprotocol/inapp-rn-sdk",
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
]
// ... other plugins (removed for brevity)
],
// .. other options (removed for brevity)
}
```

Note: This module contains custom native code which is NOT supported by Expo Go

If you're using Expo without EAS, run the following commands:

```
# For iOS
npx expo prebuild
npx expo run:ios

# For Android
npx expo prebuild
npx expo run:android
```

If you're using Expo with EAS, create a new build:

```
# For online builds
npx eas-cli build --profile development

# For local builds
npx eas-cli build --profile development --local
```
Comment on lines +69 to +75
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Incorrect EAS CLI invocation.
The bin is eas, not eas-cli. npx eas-cli will fail.

-# For online builds
-npx eas-cli build --profile development
+# For online builds
+npx eas build --profile development
 ...
-# For local builds
-npx eas-cli build --profile development --local
+# For local builds
+npx eas build --profile development --local
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
```
# For online builds
npx eas-cli build --profile development
# For local builds
npx eas-cli build --profile development --local
```
# For online builds
npx eas build --profile development
# For local builds
npx eas build --profile development --local
🤖 Prompt for AI Agents
In content/docs/react-native/installation.mdx around lines 69 to 75 the
documentation uses the incorrect EAS CLI invocation "npx eas-cli", which will
fail because the correct binary is "eas"; update both examples to use "npx eas"
(e.g. "npx eas build --profile development" and "npx eas build --profile
development --local") so the commands work as intended.


- See the [Reclaim Example - React Native](https://github.com/reclaimprotocol/reclaim-inapp-reactnative-sdk/tree/main/samples/example_new_arch) for a complete example of how to use the SDK in a React Native application.

## Get an API Key
Setup your project using the [Get API Key guide](/api-key).

# Without using Expo

## Installation

Expand Down
Loading