stripe-react-native icon indicating copy to clipboard operation
stripe-react-native copied to clipboard

Build Failure for latest package version - Xcode 14.2

Open mccabe-david opened this issue 1 year ago • 3 comments
trafficstars

Describe the bug Minimum Xcode version according to the README is 14.1, but when building with xCode, you get the error: "Missing return in getter expected to return 'String'" discussed here

To Reproduce Steps to reproduce the behavior:

  1. yarn add @stripe/stripe-react-native
  2. cd ios/ and pod install
  3. Try building in Xcode

Expected behavior Build Success

Screenshots Screen Shot 2024-08-12 at 12 14 34 PM

Desktop (please complete the following information):

  • OS: MacOS

mccabe-david avatar Aug 12 '24 16:08 mccabe-david

By upgrading to Xcode 15.4, this problem is fixed. Since Stripe IOS requires Xcode 15 or later, too, the README really should be updated.

mccabe-david avatar Aug 12 '24 18:08 mccabe-david

I'm using an iMac 2017. It is impossible to upgrade Xcode to 15.4 :(

taysonnguyen avatar Sep 06 '24 07:09 taysonnguyen

manually add return in every case like:

switch self { case .invalidRequest: return "invalidRequest" case .apiError(let stripeAPIError): return stripeAPIError.code ?? "" }

it shows same error for almost 5 - 6 files. keep adding return in them. It works for me. My xcode version is 14.3.1

mdanish1001 avatar Sep 26 '24 13:09 mdanish1001