stripe / stripe-ios

Stripe iOS SDK
https://stripe.com
MIT License
2.13k stars 982 forks source link

[BUG] After dismiss PaymentSheet, the UI breaks down #4243

Open maxhartung opened 5 days ago

maxhartung commented 5 days ago

Summary

After dismiss of PaymentSheet using SwiftUI or UIKit, my navigationController/UITabBarController goes crazy...What I mean by that ?

I try to go back but now there is no animation of my navigation controller and now the whole app is without padding

Code to reproduce

paymentSheet.present(from: UIApplication.shared.visibleViewController!, completion: { result in self.viewModel.onPaymentCompletion(result: result) })

OR

.paymentSheet(isPresented: , paymentSheet:, onCompletion: -> )

Both give the same results inside my app

iOS version

iOS 18.1

Installation method

SPM

SDK version

24

Other information

My app has the following navigation structure: UITabBarController -> UINavigationController -> UIHostingController with native SwiftUI (this is where I present the Payment Sheet)

The Payment Sheet is working great without issues but after is dismissed (doesn't matter if's successful payment or close it by X button), my app doesn't have any padding on UINavigationBar.

DrHazemAli commented 4 days ago

I think i've addressed a similar bug like this here #4246

jp-vekta commented 3 days ago

I just ran into this exact same issue after implementing the payment sheet. As you described @maxhartung, the padding is gone and all the animations have ceased to work.

plevetsky commented 3 days ago

I encountered a similar issue when presenting the payment sheet from a View Controller within a Navigation Controller. Opening the payment sheet somehow interferes with the view layouts. Everything works as expected when downgrading to version 23.32.0.

stokkeAtMonta commented 2 days ago

Also encountered this issue. After dismissing the payment sheet the UI breaks completely. What @plevetsky suggested worked for me. Just a shame I have to downgrade.. would be nice to get this fixed 👍

jp-vekta commented 1 day ago

Thanks @plevetsky! 23.32.0 worked for me as well.