Issue
I'm integrating Stripe into my react native project and after running;
npx expo install @stripe/stripe-react-native
and then;
eas build -p -ios --auto-submit
I am getting the above error when submitting to Test Flight in iOS. I am aware this is an error suggesting I need to request permissions of some sort in the Info.plist file, however, I have looked through the Expo Docs here to see if I am missing any configuration in my app.json file but to no avail.
So far I have just set up my stripe provider in. App.js
as such;
<StripeProvider
publishableKey={PUBLISHABLE_KEY}
merchantIdentifier={MERCHANT_IDENTIFIER}>
<Layout />
</StripeProvider>
app.json
"plugins": [
"expo-apple-authentication",
[
"@stripe/stripe-react-native",
{
"merchantIdentifier": "merchant.XXXXXXXXXX.customer--app",
"enableGooglePay": false
}
]
]
app.json (second format)
"plugins": [
[
"expo-apple-authentication",
[
"@stripe/stripe-react-native",
{
"merchantIdentifier": "merchant.XXXXXXXXXX.customer--app",
"enableGooglePay": false
}
]
]
]
Solution
As per Stripe Support:
The underlying Stripe iOS SDK, which the Stripe React Native SDK relies on, requires use of the device's camera for the card scanning feature that is present with PaymentSheet. This is why you see a reference to specifying “NSCameraUsageDescription” as part of your app's config.
Adding:
"infoPlist": {
"NSCameraUsageDescription": "This app uses the camera to scan payment cards."
},
under "ios"
in app.json
has resolved this issue.
Answered By - David Henry
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.