razorpay / razorpay-pod

:iphone: CocoaPod implementation of Razorpay's Payment SDK. Refer for instructions:
https://docs.razorpay.com/v1/page/ios-integration
MIT License
21 stars 18 forks source link

Attempt to present <UINavigationController: 0x7fc4120e8000> on <x.Starter: 0x7fc411a5d240> which is already presenting <x.DonorStart: 0x7fc41041e980>". #94

Closed harshithbelagur closed 4 years ago

harshithbelagur commented 4 years ago

I'm trying to use the Razorpay API to channel all donations from my application. Here, the Donate button (top right corner) is supposed to lead to the payment portal but this is the error that occurs - "Attempt to present <UINavigationController: 0x7fc4120e8000> on <x.Starter: 0x7fc411a5d240> which is already presenting <x.DonorStart: 0x7fc41041e980> /Users/sachinnautiyal/Documents/Razorpay/razorpay-ios/RazorpayIOS/CheckoutOtpelf/Classes/RazorpayCheckoutVC.swift deinitialized".

Please note that I'm a complete amateur and this is my first project, so any help would be definitely appreciated!

How do I go about fixing it?

IDE Specs

Xcode 11.4 Razorpay pod 1.1.5

Retro Steps

Screenshots

Nautiyalsachin commented 4 years ago

Hi @harshithbelagur, I think you are trying to execute rzp.open(options) from viewDidLoad(). Try executing it from viewWillAppear(_ animated: Bool). Let me know if it works for you.

Nautiyalsachin commented 4 years ago

Closing issue due to inactivity, feel free to reopen the issue. Thank you!