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

Flutter/iOS集成Stripe遇Pod生成文件编译错误求助

Flutter/iOS集成Stripe时Pod生成文件编译错误问题

我在Flutter/iOS项目中集成Stripe时,所有Pod生成文件均出现编译错误,导致应用无法运行。具体错误如下:

Swift Compiler Error (Xcode): Missing return in closure expected to return 'String'/Users/mac/Documents/Programming/Projects/yay_food/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/AnalyticLoggableError.swift:62:8
Swift Compiler Error (Xcode): Missing return in closure expected to return 'String'/Users/mac/Documents/Programming/Projects/yay_food/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/AnalyticLoggableError.swift:69:8

我多方排查后确认这并非Swift本身的问题,因为这些是Stripe为iOS自动生成的文件。已尝试执行flutter clean、重启开发环境、新建测试项目、降级Stripe版本等操作,均未解决问题。若手动修改生成类中的错误,会在其他文件出现类似错误,例如:

Swift Compiler Error (Xcode): Missing return in closure expected to return 'Bool'/Users/mac/Documents/Programming/Projects/yay_food/ios/Pods/StripePaymentSheet/StripePaymentSheet/StripePaymentSheet/Source/PaymentSheet/ViewControllers/PaymentMethodFormViewController.swift:215:8

内容的提问来源于stack exchange,提问作者Ziad H.

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.22 00:54:53