ITMS-90683:安装@stripe/stripe-react-native后,Info.plist中缺少目的字符串

yrdbyhpb  于 11个月前  发布在  React
关注(0)|答案(2)|浏览(125)

我正在将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
          }
        ]
      ]
    ]

vtwuwzda

vtwuwzda1#

您需要添加

[
        "@stripe/stripe-react-native",
        {
          "merchantIdentifier": "xxx.xxxx.xxxx",
          "enableGooglePay": true
        }
],

字符串
到你的app.json我不是100%确定,但也许商家ID不应该有--app?,只是为了好玩,尝试创建另一个更简单的形式,如com.company.app

cmssoen2

cmssoen22#

根据Stripe支持:
Stripe React Native SDK所依赖的底层Stripe iOS SDK需要使用设备的摄像头来实现PaymentSheet提供的卡扫描功能。这就是为什么您会看到指定“NSCameraUsageDescription”作为应用配置的一部分的引用。
添加:

"infoPlist": {
  "NSCameraUsageDescription": "This app uses the camera to scan payment cards."
},

字符串
app.json中的"ios"下已解决此问题。

相关问题