Skip to content

Commit ffeb877

Browse files
authored
Merge pull request #426 from razorpay/f/expo_support_documentation
F/expo support documentation
2 parents 73b2fcf + a0ce9e7 commit ffeb877

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ or using yarn:
4646
```shell
4747
yarn add react-native-razorpay
4848
```
49+
50+
For Expo Users:
51+
```shell
52+
npx expo install react-native-razorpay
53+
```
54+
4955
## Requirements
5056

5157
- iOS 10.0+ / macOS 10.12+ / tvOS 10.0+ / watchOS 3.0+
@@ -137,6 +143,18 @@ Run your project (Cmd+R)
137143
```
138144
</details>
139145
146+
### Note for Expo Applications:
147+
148+
After adding the react-native-razorpay package,the option to `prebuild` the app must be used(this generates the android/ios platform folders in the project to use native-modules). Command for which,
149+
```shell
150+
npx expo prebuild
151+
```
152+
After which the application will be installed on the device/emulator.
153+
```shell
154+
npx expo run:[ios|android] --device
155+
```
156+
157+
140158
## Usage
141159

142160
Sample code to integrate with Razorpay can be found in
@@ -204,6 +222,23 @@ If you are using proguard for your builds, you need to add following lines to pr
204222
205223
## FAQ's
206224
225+
- For UPI Intent in iOS, the info.plist in iOS should be modified to include `LSApplicationQueriesSchemes`
226+
- For Bare React-Native Apps:
227+
- info.plist can directly be modified from the xcode project. LSApplicationQueriesSchemes takes as array value and can currently include only ["tez","phonepe","paytmmp"]
228+
- For Expo Apps:
229+
- Directly modifying info.plist is discouraged, and hence this should be added in app.json
230+
```shell
231+
"ios": {
232+
"infoPlist": {
233+
"LSApplicationQueriesSchemes": [
234+
"tez",
235+
"phonepe",
236+
"paytmmp"
237+
]
238+
}
239+
}
240+
```
241+
- P.S: The apps won't be visible if the application is run with metro builder. The info.plist is generated successfully and integrated only when the app is built as standalone app.
207242
- Still having trouble with integrating our payment gateway? Follow [this link](https://github.com/razorpay/react-native-razorpay/wiki/FAQ's) for more info.
208243
209244
## Contributing

0 commit comments

Comments
 (0)