Caching Prices

This component is capable of retrieving prices and localized titles of products from the server, for products defined on Apple platforms. It also formats prices in a user-friendly manner for PayPal items.

To start this process, call the CachePrices method. This process runs in background and returns immediately.

Once item details are updated, PriceCache and Title properties will be updated (Title will not be updated when using PayPal) with their localized values and OnPriceCached will be called (you can use it to update the user interface, if needed).

In case an item was reported as invalid, the PriceCache field will contain a single dash (i.e. “‑”), instead of the actual price, but no error will be reported at this point (an error is only reported once you call the Buy method).

Notice, you should always be prepared for OnPriceCached event to be called: it might be called, for example, during the purchase processing. Calling CachePrices also speeds up any future calls to the Buy method.