loadProduct(withParameters:completionBlock:)
Loads a new product screen to display.
Declaration
func loadProduct(withParameters parameters: [String : Any], completionBlock block: ((Bool, (any Error)?) -> Void)? = nil)func loadProduct(withParameters parameters: [String : Any]) async throws -> BoolParameters
- parameters:
A dictionary describing the content you want the view controller to display. See Product Dictionary Keys for keys that describe the product. See Ad Network Install Validation Keys for keys that describe an impression in an advertising campaign.
- block:
A block to be called when the product information has been loaded from the App Store. The completion block is called on the main thread and receives the following parameters:
Mentioned in
Discussion
For a seamless user experience, load the product information before presenting the SKStoreProductViewController view controller. However, if you load the product information while presenting the view controller, once loaded, the product data replaces the contents of the view controller.