我正在将Stripe集成到我的react native项目中,运行后;
npx expo install @stripe/stripe-react-native
字符串
然后,
eas build -p -ios --auto-submit
型
我在iOS中提交Test Flight时收到上述错误。我知道这是一个错误,建议我需要在Info.plist文件中请求某种权限,但是,我已经查看了Expo Mix 1 e1f1x,看看我的app.json文件中是否缺少任何配置,但无济于事。
到目前为止,我刚刚在. App.js
中设置了条带提供程序;
<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(第二种格式)
"plugins": [
[
"expo-apple-authentication",
[
"@stripe/stripe-react-native",
{
"merchantIdentifier": "merchant.XXXXXXXXXX.customer--app",
"enableGooglePay": false
}
]
]
]
型
2条答案
按热度按时间vtwuwzda1#
您需要添加
字符串
到你的app.json我不是100%确定,但也许商家ID不应该有--app?,只是为了好玩,尝试创建另一个更简单的形式,如com.company.app
cmssoen22#
根据Stripe支持:
Stripe React Native SDK所依赖的底层Stripe iOS SDK需要使用设备的摄像头来实现PaymentSheet提供的卡扫描功能。这就是为什么您会看到指定“NSCameraUsageDescription”作为应用配置的一部分的引用。
添加:
字符串
在
app.json
中的"ios"
下已解决此问题。