showNotice(type:)
Displays the system disclosure notice sheet and asks the customer whether to continue.
Declaration
static func showNotice(type: ExternalPurchaseCustomLink.NoticeType) async throws -> ExternalPurchaseCustomLink.NoticeResultParameters
- type:
An Noticetype value you select that determines the disclosure sheet the system displays.
Return Value
Returns ExternalPurchaseCustomLink.NoticeResult.continued to indicate the customer chooses to continue, or ExternalPurchaseCustomLink.NoticeResult.cancelled to indicate the customer chooses not to continue to view external purchases. This method throws an error if your app isn’t eligible, at runtime, to use this API.
Discussion
Use this method if your app configures the SKExternalPurchaseCustomLinkRegions or SKExternalPurchaseLinkStreamingRegions property list keys.
Call this method to display the system disclosure sheet before your app continues to communicate and promote offers for purchase in a distribution channel of your choice. Call this method in response to a deliberate customer action, such as tapping a button.
Select the notice type based on how your app communicates the offers if the customer chooses to continue:
Use ExternalPurchaseCustomLink.NoticeType.browser if the app goes to the background, and promotes offers in a destination outside of the app.
Use ExternalPurchaseCustomLink.NoticeType.withinApp if the app promotes offers in a web view or native experience within the app.
Continue to communicate and promote offers if showNotice(type:) returns ExternalPurchaseCustomLink.NoticeResult.continued; otherwise don’t continue.
For example code that calls this method, see ExternalPurchaseCustomLink.