iosiphoneadsstorekit

How to detect when a Storekit Modal, or StoreKit Overlay is shown by ads in my app?


I am showing ads in my app that have the AppStore overlay/modal. Is there a way for me to detect when an ad shows that overlay in my app in production? I want to measure how often an ad shows the Storekit Modal, or StoreKit Overlay. Is there a way to detect this?

Reference for Storekit and StoreKit Overlay from Vungle website:
https://support.vungle.com/hc/en-us/articles/360056673092-The-Liftoff-Monetize-Conversion-Experience#storekit-0-4


Solution

  • Found the information I was looking for:

    For StoreKit Overlay there is a delegate callback.

    storeOverlayDidFinishPresentation(_:transitionContext:)

    Ref: https://developer.apple.com/documentation/storekit/skoverlaydelegate/3566707-storeoverlaydidfinishpresentatio

    For SKStoreProductViewController there is a completion block in the loadProduct call:

        withParameters parameters: [String : Any],
        impression: SKAdImpression,
        **completionBlock** block: ((Bool, (any Error)?) -> Void)? = nil
    )```
    
    
    Ref: https://developer.apple.com/documentation/storekit/skstoreproductviewcontroller/3951378-loadproduct
    
    
    Thanks