Solved

Supporting SKPaymentTransactionObserver for Flutter app

  • 5 October 2021
  • 3 replies
  • 558 views

Userlevel 2
Badge +9

We are interested in supporting App Store Promotion for our subscription feature and noticed saw that SKPaymentTransactionObserver method is required to process this transaction.

 

We are using Flutter with RevenueCat (and inexperienced with native iOS) and had some clarifying questions:

  1. Is shouldPurchasePromoProduct in https://docs.revenuecat.com/v3.0/docs/configuring-sdk equivalent to supporting the SKPaymentTransactionObserver?
  2. If question above is yes, does shouldPurchasePromoProduct have to be implemented on the native iOS side? Is there any recommended ways to support this in Flutter? 
  3. The documentation mentions “If your app is able to handle a purchase at the current time.”  What conditions or user states should we be aware of to know if the purchase can be handled (e.g., is it just whether we can tell our app that the user is now a subscribed user?)

 

Thanks!

icon

Best answer by jazmine 14 October 2021, 22:15

View original

3 replies

Userlevel 3
Badge +7

Hey @Steph

Unfortunately we don’t have We don't support SKPaymentTransactionObserver's paymentQueue(_:shouldAddStorePayment:for:) in our Flutter SDK yet and don’t currently have a workaround. Sorry for the inconvenience, but I can let you know if the future when this behavior is supported!

Userlevel 2
Badge +9

@jazmine Got it, thanks! To verify, would we be able to implement SKPaymentTransactionObserver in native iOS?

Userlevel 3
Badge +3

HI @Steph good news! We added this functionality in our latest Flutter release, 3.10.0.

 

Please see the comment on our open purchases-flutter Github issue for more instructions on how to use it: https://github.com/RevenueCat/purchases-flutter/issues/341#issuecomment-1101862607

Reply