Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed preventPurchasePopupCallFromTriggeringCacheRefresh, update caches on willEnterForeground #2623

Commits on Jun 12, 2023

  1. Removed preventPurchasePopupCallFromTriggeringCacheRefresh, update …

    …caches on `willEnterForeground`
    
    This method was a hack to deal with apps getting `didBecomeActive` notifications in the middle of a purchase when the popups were displayed.
    This had several problems:
    - It was only being used for StoreKit 1 purchases
    - It wasn't used for StoreKit 2 purchases through the SDK
    - It wasn't used for purchases initiated outside the SDK (like using the upcoming paywall screens)
    - It updated the cache timestamp to "now", including offerings, despite not actually updating data
    - It was an indirect and implicit way of solving a problem instead of an explicit one
    
    This solves the same by observing `willEnterForeground`, which only happens when the app actually comes back from the background, and not when it simply loses focus.
    NachoSoto committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    c0538c8 View commit details
    Browse the repository at this point in the history
  2. Added new test

    NachoSoto committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    4ca2b74 View commit details
    Browse the repository at this point in the history