Contents

paymentShippingAddressUnserviceableError(withLocalizedDescription:)

Creates an error for an unserviceable address, with the supplied user-facing error message.

Declaration

class func paymentShippingAddressUnserviceableError(withLocalizedDescription localizedDescription: String?) -> any Error

Parameters

  • localizedDescription:

    Optional. Provide a localized, user-facing error message string to help the user resolve the error.

Discussion

You can use this convenience method to create a payment error object instead of creating an NSError object yourself. This method indicates that the address received from the Apple Pay sheet is unserviceable.

The error you provide and its optional message appear on the Apple Pay sheet. The available space to display messages is limited, so you should keep your messages concise.

See Also

Providing error information