Solved

How can I stop the process in iOS?

  • 24 September 2021
  • 1 reply
  • 30 views

Badge +1

I am stuck with a problem.

I am using the consumable In app purchase through RevenueCat to achieve in app currencies.

The payment page is displayed in modal view pageSheet style.

 

When I press the purchase UIButton, the process starts.

After the process ends, I am saving the payment record in Firestore.

And in cloud functions, the save method triggers adding currency in users data document.

It is working fine using normally.

 

But, if the view is dismissed quickly after the payment UIButton is pressed,

the process will go trough and purchase alert shows up in the other view(is not a bad thing) but,

the code after purchase (saving purchase data in Firestore) doesn’t work (=think because the view is already dismissed?).

 

I thought of cancelling the process if the purchase view is dismissed

but  could not find a way to observe the purchase transaction.  

 

Ofcourse displaying the view in fullScreen will resolve the problem but want to try it in current circumstances.

Can any one help?? Any suggestions?

icon

Best answer by Haj 25 September 2021, 04:28

View original

1 reply

Badge +1

I’ve dicided to make the saving firestore class singleton which resolved the problem.

Reply