ProductView
struct · iOS 17.0+ · SDK 27.1
@MainActor @preconcurrency struct ProductView<Icon, PlaceholderIcon> where Icon : View, PlaceholderIcon : ViewA view that merchandises an invididual in-app purchase product. You create a product view by providing a product identifier to load from the App Store, or a ``StoreKit/Product`` value you've already loaded. If you provide a product identifier, the view will load the product's information from the App Store automatically, and update the view when the product is available. The product view shows information about the product, and displays a button for someone to purchase the product. You can also provide a view to use as an icon for the product view. If you provide a product identifier, you can optionally provide a different placeholder for your icon other than the automatic placeholder icon. If you set up a promoted image for the product in App Store Connect, you can choose to use that image as the icon. You can customize the product view's appearance using one of the standard styles, like ``ProductViewStyle/compact``, and apply the style with the ``productViewStyle(_:)-8by3`` modifier. You can also create custom styles. To create a custom style, create a style that conforms to the ``ProductViewStyle`` protocol.
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
8 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
ProductView.init(id:icon:placeholderIcon:)
callback cannot propagate synchronous failure
ProductView.init(id:prefersPromotionalIcon:icon:placeholderIcon:)
callback cannot propagate synchronous failure
ProductView.init(id:prefersPromotionalIcon:icon:)
callback cannot propagate synchronous failure
ProductView.init(id:prefersPromotionalIcon:)
The iOS SDK compiler rejected this binding: cannot find type 'SwiftUICore' in scope
ProductView.init(_:icon:)
callback cannot propagate synchronous failure
ProductView.init(_:prefersPromotionalIcon:icon:)
callback cannot propagate synchronous failure
ProductView.init(_:prefersPromotionalIcon:)
The iOS SDK compiler rejected this binding: cannot find type 'SwiftUICore' in scope
ProductView.body
This protocol needs associated types that cannot yet cross the bridge.