Skip to content

Commit 953f038

Browse files
author
madhavanmalolan
committed
Merging Expo and RN docs, with expo specific instructions
1 parent 32c9dd2 commit 953f038

File tree

6 files changed

+61
-313
lines changed

6 files changed

+61
-313
lines changed

content/docs/expo/installation.mdx

Lines changed: 0 additions & 135 deletions
This file was deleted.

content/docs/expo/meta.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

content/docs/expo/usage.mdx

Lines changed: 0 additions & 164 deletions
This file was deleted.

content/docs/meta.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
"android-kotlin",
1010
"flutter",
1111
"ionic",
12-
"expo",
1312
"onchain",
1413
"zkfetch",
1514
"ai-agent",

content/docs/react-native/installation.mdx

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,70 @@ import { Accordion, Accordions } from 'fumadocs-ui/components/accordion';
1313
{ 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' },
1414
]} />
1515

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

17-
Note:
18-
- This SDK may not be compatible with React Native [Frameworks](https://reactnative.dev/architecture/glossary#react-native-framework) like Expo.
19-
- 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).
2019

21-
## Example
20+
# Using Expo
21+
## Installation
22+
23+
```package-install
24+
npx expo install @reclaimprotocol/inapp-rn-sdk
25+
```
26+
27+
## Setup
28+
29+
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:
30+
31+
```diff
32+
{
33+
// .. other plugin options (removed for brevity)
34+
"plugins": [
35+
"expo-router",
36+
// Add the following in the plugins section:
37+
+ "@reclaimprotocol/inapp-rn-sdk",
38+
[
39+
"expo-splash-screen",
40+
{
41+
"image": "./assets/images/splash-icon.png",
42+
"imageWidth": 200,
43+
"resizeMode": "contain",
44+
"backgroundColor": "#ffffff"
45+
}
46+
]
47+
// ... other plugins (removed for brevity)
48+
],
49+
// .. other options (removed for brevity)
50+
}
51+
```
52+
53+
Note: This module contains custom native code which is NOT supported by Expo Go
54+
55+
If you're using Expo without EAS, run the following commands:
56+
57+
```
58+
# For iOS
59+
npx expo prebuild
60+
npx expo run:ios
61+
62+
# For Android
63+
npx expo prebuild
64+
npx expo run:android
65+
```
66+
67+
If you're using Expo with EAS, create a new build:
68+
69+
```
70+
# For online builds
71+
npx eas-cli build --profile development
72+
73+
# For local builds
74+
npx eas-cli build --profile development --local
75+
```
2276

23-
- 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.
2477

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

79+
# Without using Expo
2880

2981
## Installation
3082

0 commit comments

Comments
 (0)