Contents

canOpen

A Boolean value that indicates whether the app can successfully open the configured external purchase link in the current App Store storefront.

Declaration

static var canOpen: Bool { get async }

Discussion

Use this method if your app configures the SKExternalPurchaseLink property list key.

Check this property, as shown below, to determine whether your app can successfully call open().

await ExternalPurchaseLink.canOpen

If the result is true, configure any user-interface controls that enable people to open the external purchase link. You configure that link in the SKExternalPurchaseLink property list key in the Info.plist file. There’s no need to call canOpen again, unless the App Store storefront changes. For more information about the App Store storefront, see Storefront.

This property is true if all the following conditions are met:

Otherwise, this property is false.

When this property is false, check canMakePayments to determine whether your app can offer in-app purchases using the StoreKit In-App Purchase APIs. For more information, see canMakePayments.

See Also

Getting a single external purchase link