Skip to content

Respond to Storefront updates #1382

Description

@aboedo

When the Storefront is changed while the app is live, we have some stuff in cache that needs to be updated.

This could lead to some issues, outlined here.

We should:

  • Listen to Storefront updates (SK2 method here, SK1 method here)
  • When the storefront is updated, clear caches for offerings + ProductsFetcherSK1 and ProductsFetcherSK2
  • Bonus points: eagerly re-fetch products that had beeb previously fetched in productsFetchers + re-fetch offerings
  • Add a new method in purchasesDelegate that ports that notification over to the developer.

The case where the storefront is updated while the app is open is fairly rare, so this won't affect many apps in real life. But long-running apps could be affected, and it isn't impossible to run into this.

At the very least, if we're eagerly refreshing offerings and products when the storefront is updated, apps will get fresh products when calling getOfferings again, which might already be enough for most developers.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions