Skip to main content
Solved

iOS: Binary doesn’t include the SKPaymentTransactionObserver method.


Forum|alt.badge.img+3
  • Helper
  • 3 replies

My IAP Promotions were being held because my binary  “did not include the SKPaymentTransactionObserver method” I haven’t seen anything like this before. I had presumed that this would be included in the Purchases package. Am I missing something, or did Apple? Thanks

Best answer by Bry

Thanks for the quick response. The issue was on my end with not properly implementing the `shouldPurchasePromoProduct`. If anyone else is looking to this answer to help implement it, I also found this StackOverflow question that helped a great deal. The biggest takeaway from this was understanding how the transaction is completed. The answer explained:

“Note that you don't have to call purchaseProduct inside the block. Calling the block will be equivalent to calling purchaseProduct and it will open the purchase dialog.”

That was where I was stuck in my implementation.

View original
Did this post help you find an answer to your question?

5 replies

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • July 23, 2021

According to this StackOverflow question it seems like it may be an issue on Apple’s end. It may be worth to contact Apple Developer Support to see if they can help out.

If that doesn’t help, can you share the version and SDK (native, Flutter, etc.) you’re using?


sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • July 23, 2021

The team also mentioned that you should confirm that you implemented the shouldPurchasePromoProduct delegate method of PurchasesDelegate:. First add the AppDelegate as a PurchasesDelegate:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        Purchases.configure(withAPIKey: API_KEY)

        /// - Set the delegate to this instance of AppDelegate.
        Purchases.shared.delegate = self

        return true
}

 Then implement the delegate function in AppDelegate:

func purchases(_ purchases: Purchases, shouldPurchasePromoProduct product: SKProduct, defermentBlock makeDeferredPurchase: @escaping RCDeferredPromotionalPurchaseBlock) {
    makeDeferredPurchase { (transaction, info, error, cancelled) in
        if let purchaserInfo = info {
            handlePurchaserInfo()
        }
    }
}

There’s a little more information on shouldPurchasePromoProduct in our guide on configuring the SDK.


sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • July 23, 2021

There’s a bit more sample code here if that ends up being the issue: https://github.com/RevenueCat/purchases-ios/issues/651#issuecomment-880272931


Forum|alt.badge.img+3
  • Author
  • Helper
  • 3 replies
  • Answer
  • July 24, 2021

Thanks for the quick response. The issue was on my end with not properly implementing the `shouldPurchasePromoProduct`. If anyone else is looking to this answer to help implement it, I also found this StackOverflow question that helped a great deal. The biggest takeaway from this was understanding how the transaction is completed. The answer explained:

“Note that you don't have to call purchaseProduct inside the block. Calling the block will be equivalent to calling purchaseProduct and it will open the purchase dialog.”

That was where I was stuck in my implementation.


Forum|alt.badge.img+5
  • Member
  • 9 replies
  • June 2, 2022

Hello,

Is there a way to use “App Store Promotions In-app purchase” without native code for such as Flutter app?

Thank you!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings