Shopify / checkout-sheet-kit-swift

Shopify’s Checkout Sheet Kit makes it simple to perform a checkout inside your Swift native app.
MIT License
38 stars 16 forks source link

Optimise preloading config #85

Closed cianbuckley closed 10 months ago

cianbuckley commented 11 months ago

What are you trying to accomplish?

Note: This requires a major release as it's a breaking change to the API (removing preloading config)

prior to change, developers needed to enable preloading flag and then call preload.

ShopifyCheckout.configuration.preloading.enabled = false
ShopifyCheckout.preload() // does nothing

ShopifyCheckout.configuration.preloading.enabled = true
ShopifyCheckout.preload() // preloads

After this change, developers need only call preload

ShopifyCheckout.preload() // preloads and caches checkout view. If it's not called, checkout view is never cached

Before you deploy