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.

