stripe / stripe-react-native

React Native library for Stripe.
https://stripe.dev/stripe-react-native
MIT License
1.23k stars 255 forks source link

iOS build fails after upgrade to RN 0.74 due to StripeCore #1671

Open nmehlei opened 1 month ago

nmehlei commented 1 month ago

Describe the bug React Native App refuses to build for iOS after upgrade to React Native 0.74.1, with a rather generic build failure citing StripeCore as the source. I tried different variations, but it always fails due to StripeCore.

To Reproduce Steps to reproduce the behavior:

  1. Integrate stripe-react-native in RN app based on RN 0.73
  2. Upgrade RN app to 0.74.0 or 0.74.1
  3. Try to compile

Expected behavior Compilation should work, after doing the usual steps (pod install, etc.)

Screenshots

The following build commands failed: CompileSwift normal arm64 (in target 'StripeCore' from project 'Pods') SwiftCompile normal arm64 Compiling\ Analytic.swift,\ AnalyticLoggableError.swift,\ AnalyticsClientV2.swift,\ Async.swift,\ BundleLocatorProtocol.swift,\ ConnectionsSDKInterface.swift,\ Decimal+StripeCore.swift,\ Dictionary+Stripe.swift,\ DownloadManager.swift,\ EmptyResponse.swift,\ Enums+CustomStringConvertible.swift,\ FileDownloader.swift,\ FraudDetectionData.swift,\ InstallMethod.swift,\ Locale+StripeCore.swift,\ NetworkDetector.swift,\ NSArray+Stripe.swift,\ NSBundle+Stripe_AppName.swift,\ NSCharacterSet+StripeCore.swift,\ NSError+Stripe.swift,\ NSError+StripeCore.swift,\ NSMutableURLRequest+Stripe.swift,\ NSURLComponents+Stripe.swift,\ PaymentsSDKVariant.swift,\ PluginDetector.swift,\ ServerErrorMapper.swift,\ STPAnalyticEvent.swift,\ STPAnalyticsClient.swift,\ STPAPIClient.swift,\ STPAPIClient+FileUpload.swift,\ STPAppInfo.swift,\ STPDeviceUtils.swift,\ STPDispatchFunctions.swift,\ STPError.swift,\ STPLocalizationUtils.swift,\ STPLocalizedString.swift,\ STPMultipartFormDataEncoder.swift,\ STPMultipartFormDataPart.swift,\ STPNumericStringValidator.swift,\ STPTelemetryClient.swift,\ STPURLCallbackHandler.swift,\ String+Localized.swift,\ String+StripeCore.swift,\ StripeAPI.swift,\ StripeAPIConfiguration.swift,\ StripeAPIConfiguration+Version.swift,\ StripeCodable.swift,\ StripeCoreBundleLocator.swift,\ StripeError.swift,\ StripeFile.swift,\ StripeJSONDecoder.swift,\ StripeJSONEncoder.swift,\ StripeJSONShared.swift,\ StripeServiceError.swift,\ UIActivityIndicatorView+Stripe.swift,\ UIFont+Stripe.swift,\ UIImage+StripeCore.swift,\ UnknownFields.swift,\ URLEncoder.swift,\ URLSession+Retry.swift,\ UserDefaults+PaymentsCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/Analytic.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/AnalyticLoggableError.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/AnalyticsClientV2.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/Async.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/BundleLocatorProtocol.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Connections\ Bindings/ConnectionsSDKInterface.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/Decimal+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/Dictionary+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/DownloadManager/DownloadManager.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/Models/EmptyResponse.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/Enums+CustomStringConvertible.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/FileDownloader.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Telemetry/FraudDetectionData.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/InstallMethod.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/Locale+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/NetworkDetector.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSArray+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSBundle+Stripe_AppName.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSCharacterSet+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSError+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSError+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSMutableURLRequest+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/NSURLComponents+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/PaymentsSDKVariant.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/PluginDetector.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/ServerErrorMapper.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/STPAnalyticEvent.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Analytics/STPAnalyticsClient.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/STPAPIClient.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/STPAPIClient+FileUpload.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/STPAppInfo.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/STPDeviceUtils.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/STPDispatchFunctions.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/STPError.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Localization/STPLocalizationUtils.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Localization/STPLocalizedString.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/STPMultipartFormDataEncoder.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/STPMultipartFormDataPart.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/STPNumericStringValidator.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Telemetry/STPTelemetryClient.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/STPURLCallbackHandler.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Localization/String+Localized.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/String+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/StripeAPI.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/StripeAPIConfiguration.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/StripeAPIConfiguration+Version.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Coder/StripeCodable.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/StripeCoreBundleLocator.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/StripeError.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/Models/StripeFile.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Coder/StripeJSONDecoder.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Coder/StripeJSONEncoder.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Coder/StripeJSONShared.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/API\ Bindings/StripeServiceError.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/UI/UIActivityIndicatorView+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/UI/UIFont+Stripe.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Categories/UIImage+StripeCore.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Coder/UnknownFields.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/URLEncoder.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Helpers/URLSession+Retry.swift /Users/johndoe/Dev/Source/MyApp/MyAppApp/ios/Pods/StripeCore/StripeCore/StripeCore/Source/Telemetry/UserDefaults+PaymentsCore.swift (in target 'StripeCore' from project 'Pods') (2 failures) Build failed

Desktop (please complete the following information):

Smartphone (please complete the following information): This section does not apply, as it already fails on build

MariuzM commented 1 week ago

Yes same for me

    "expo": "~51.0.18",
    "react-native": "0.74.3",

But is only happening because i have, without it it builds

    [
      'expo-build-properties',
      {
        ios: {
          useFrameworks: 'static', // For Firebase
        },
      },
    ],
SCR-20240704-svbc
nmehlei commented 1 week ago

I figured it out. My Podfile was setting the IPHONEOS_DEPLOYMENT_TARGET value to 12.0 due to a different issue. 12.0 is below the supported version of stripe-react-native (which is 13.0), thus - I presume - leading to this issue. After I changed this value to 13.0 compilation worked again.

Screenshot 2024-07-05 at 23 19 05
MariuzM commented 1 week ago

But this one does not make sense to me, i had in build props set to specific target but i was still getting this error with IPHONEOS_DEPLOYMENT_TARGET