tipsi / tipsi-stripe

React Native Stripe binding for iOS/Android platforms
MIT License
1.14k stars 527 forks source link

Update stripe-ios dependency to support building against iOS 16 SDK #863

Closed fiznool closed 1 year ago

fiznool commented 1 year ago

Firstly, I understand that this library is no longer maintained, and so I'm aware that this might never get merged in. However, there is an issue with the library as it stands, meaning that it will not build against the iOS 16 SDK. This is a problem since starting April 25, Apple mandate that all submissions to the App Store must be built against the iOS 16 SDK or later.

The underlying reason that the library does not support iOS 16 is due to the stripe-ios dependency, which is currently set at v21. Updating to v22 fixes this issue, but this also necessitates a bump of the minimum supported version of iOS to 12. This is why the changes in this PR also include a bump to the major package version of this library, as technically this is a breaking change for users who currently target iOS 11.

For those of us that need to incorporate these changes before (if?) the PR is merged, I would recommend using the excellent patch-package tool, with the following patch:

diff --git a/node_modules/tipsi-stripe/tipsi-stripe.podspec b/node_modules/tipsi-stripe/tipsi-stripe.podspec
index e95d222..5b29dd3 100644
--- a/node_modules/tipsi-stripe/tipsi-stripe.podspec
+++ b/node_modules/tipsi-stripe/tipsi-stripe.podspec
@@ -13,11 +13,11 @@ Pod::Spec.new do |s|
   s.source         = { :git => 'https://github.com/tipsi/tipsi-stripe', :tag => s.version }

   s.requires_arc   = true
-  s.platform       = :ios, '11.0'
+  s.platform       = :ios, '12.0'

   s.preserve_paths = 'LICENSE', 'README.md'
   s.source_files   = 'ios/TPSStripe/**/*.{h,m}'

   s.dependency 'React'
-  s.dependency 'Stripe', '>= 21.3.1'
+  s.dependency 'Stripe', '22.8.4'
 end
cybergrind commented 1 year ago

@fiznool honestly, I can merge it.

But we're relying that you've tested it and everything works without testing on my side it

fiznool commented 1 year ago

I've tested the native payment methods and paymentRequestWithCardForm which all work fine. I think, given the nature of Apple's forthcoming policy, coupled with the fact this is a major release bump, publishing this as v11.0.0 with the small potential for issues is preferable to people not being able to submit app updates.

cybergrind commented 1 year ago

@fiznool ok, going to rollout it thank you!