Skip to main content

Hi, I want to promote my IAP, does RevenueCat provide a guideline for implementing this app store promotions?  Thanks!!

---------------------------

App Store Promotions

You can promote up to 20 in-app purchases, and they’ll appear on your app’s product page and can be shown in search results or be featured by our editorial team. Users can tap an in-app purchase to open your app, where they can buy it. Make sure your app supports the SKPaymentTransactionObserver method to process this transaction. 

Hey @RRN!

Yes yes, RevenueCat does support SKPaymentTransactionObserver so this flow to promote IAPs will work for you 😊 

Thanks!


Hey @RRN!

Yes yes, RevenueCat does support SKPaymentTransactionObserver so this flow to promote IAPs will work for you 😊 

Thanks!

Hi, thanks for your answer. Do you have a guide to set it up?


@RRN Nope because there is nothing you should have to do! The SDK is already observing it and will handle purchases that come in through that method/flow automatically 😊 


@RRN Nope because there is nothing you should have to do! The SDK is already observing it and will handle purchases that come in through that method/flow automatically 😊 

I am rather new here, so I just set it up on the “App Store Connect”, then everything will work fine?


@RRN Ideally! The RevenueCat SDK listens for something to come through in that observer and then it should automatically open up the IAP purchase modal for that 😊 

If you get issues and it doesn’t work just come back to us and we’ll help you out!


@RRN Ideally! The RevenueCat SDK listens for something to come through in that observer and then it should automatically open up the IAP purchase modal for that 😊 

If you get issues and it doesn’t work just come back to us and we’ll help you out!

Hi, I just tested, it can open the app, but the IAP purchase modal doesn’t open automatically. 


@RRN Ah! Hmmm… thanks for letting me know! I’ll give a try myself and see what I can come up with. What version of the SDK are you using?


@RRN Ah! Hmmm… thanks for letting me know! I’ll give a try myself and see what I can come up with. What version of the SDK are you using?

I am not sure, how can I check?  It should be pretty old, at least 1 year ago. 


@RRN 

  • If you are using CocoaPods, you can check in your Podfile.lock or Podfile
  • If you are using SPM, you can check the “Package Dependencies” (see image below) in the Project navigator
  • If you are using Carthage, you should be able to check in your Cartfile.lcok

 


@RRN

  • If you are using CocoaPods, you can check in your Podfile.lock or Podfile
  • If you are using SPM, you can check the “Package Dependencies” (see image below) in the Project navigator
  • If you are using Carthage, you should be able to check in your Cartfile.lcok

 

Thanks, it is 3.2.2  :)


@RRN 

Okay, I was mistaken! You do need to do _a little_ bit of work 😇

You need to implement on of the `PurchasesDelegate` functions - https://docs.revenuecat.com/docs/configuring-sdk#ios

extension AppDelegate: PurchasesDelegate {
func purchases(_ purchases: Purchases, shouldPurchasePromoProduct product: StoreProduct, defermentBlock makeDeferredPurchase: @escaping DeferredPromotionalPurchaseBlock) {

makeDeferredPurchase { (transaction, customerInfo, error, success) in
print("Yay")
}
}
}

It would look something like this ☝️ You need to call `makeDeferredPurchase` when your app is in a state where I can make the purchase 😊 

Note: These docs and example code are using our new v4 SDK. Which would be good to upgrade to at some point but it could require a little bit of migration.

The v3.2.2 docs can be found here - https://docs.revenuecat.com/v3.1/docs/configuring-sdk#ios

Hopefully this helps but let me know if this still doesn’t work!


@RRN

Okay, I was mistaken! You do need to do _a little_ bit of work 😇

You need to implement on of the `PurchasesDelegate` functions - https://docs.revenuecat.com/docs/configuring-sdk#ios

extension AppDelegate: PurchasesDelegate {
func purchases(_ purchases: Purchases, shouldPurchasePromoProduct product: StoreProduct, defermentBlock makeDeferredPurchase: @escaping DeferredPromotionalPurchaseBlock) {

makeDeferredPurchase { (transaction, customerInfo, error, success) in
print("Yay")
}
}
}

It would look something like this ☝️ You need to call `makeDeferredPurchase` when your app is in a state where I can make the purchase 😊 

Note: These docs and example code are using our new v4 SDK. Which would be good to upgrade to at some point but it could require a little bit of migration.

The v3.2.2 docs can be found here - https://docs.revenuecat.com/v3.1/docs/configuring-sdk#ios

Hopefully this helps but let me know if this still doesn’t work!

Thanks, I will test it!!


Reply