Contents

showNotice(for:)

Displays the system disclosure notice sheet for a custom link type and asks the customer whether to continue.

Declaration

static func showNotice(for externalPurchaseType: ExternalPurchaseCustomLink.ExternalPurchaseType) async throws -> ExternalPurchaseCustomLink.NoticeResult

Parameters

  • externalPurchaseType:

    An Externalpurchasetype value you select that determines the disclosure sheet the system displays.

Return Value

This method 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 to use this API at runtime. In case of an error, this method throws a StoreKitError.

Discussion

Use this method in combination with a specific entitlement entitlement assigned to your app and Information Property List key depending on the region where you want to offer external purchases, following these guidelines:

An app needs to call this method when a customer taps on a button or scans a QR code to begin a purchase through an alternative payment processor within an app, or to go out of the app to engage with an offer. If isEligible is false, this method always fails.

Select the notice type based on how your app communicates the offers if the customer chooses to continue:

Continue with the offer if showNotice(type:) returns ExternalPurchaseCustomLink.NoticeResult.continued; otherwise, don’t continue.

For example code that calls this method, see ExternalPurchaseCustomLink.

See also

See Also

Displaying the disclosure sheet