You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native iOS迁移tipsi-stripe至@stripe/stripe-react-native后构建失败求助

React Native iOS迁移@stripe/stripe-react-native后构建失败求助

将React Native iOS应用中的tipsi-stripe替换为@stripe/stripe-react-native后,应用无法正常运行。卸载tipsi-stripe并安装@stripe/stripe-react-native后,构建应用时出现错误,请求提供解决方案。

相关代码

App.js

import React ,{Component} from 'react';
import { StripeProvider } from '@stripe/stripe-react-native';
import {
  SafeAreaView,
  ScrollView,
  StatusBar,
  StyleSheet,
  Text,
  useColorScheme,
  View,
} from 'react-native';

import PaymentScreen from './PaymentScreen';


export default class CheckoutSignin extends Component {
 render(){
 return (
      <StripeProvider
     publishableKey="pk_test_qblFNYngBkEdjEZ16jxxoWSM"
     urlScheme="your-url-scheme" // required for 3D Secure and bank redirects
     merchantIdentifier="merchant.com.{{YOUR_APP_NAME}}" // required for Apple Pay
   >
   <PaymentScreen/>
    </StripeProvider>
  );
};

}

package.json

"dependencies": {
  "@stripe/stripe-react-native": "0.22.1"
}

错误截图

Error : screenshot-1
Error : screenshot-2

内容的提问来源于stack exchange,提问作者Muhammad Saqib Noor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 14:50:19