Apl an Error Occurred and Your Request Could Not Be Completed Please Try Again Later
In our series of articles, my team and I are talking nearly in-app purchases implementation for iOS. And this is the 5th article in a series. Follow the links to read previous articles:
- iOS in-app purchases, part 1: configuration and calculation to the project.
- iOS in-app purchases, function 2: initialization and purchases processing.
- iOS in-app purchases, part 3: testing purchases in XCode.
- iOS in-app purchases, part iv: server-side receipt validation.
- iOS in-app purchases: the list of SKError codes and how to handle them.
In this mail service, I will address the SKErrors: what problems they imply and what to exercise about them. For each error, nosotros will piece of work out iii aspects: why it occurs, how to handle them, and what bulletin to brandish in the mistake notification.
SKError.Code.unknown, code 0
What information technology ways. An error occurred for an unknown reason.
How to fix information technology. No action is needed from the developers' side. This error also comes on a request when trying to go products when using the iOS 14 and above simulator. In this instance, to get a product, use the StoreKit local testing or a real device/emulator with the iOS version below iOS xiv.
What bulletin to display. Sorry, the purchase is unavailable for an unknown reason. Please try once more afterwards.
SKError.Lawmaking.clientInvalid, lawmaking one
What information technology means. The user cannot make a buy. For example, a kid tries to buy something when the parental control role on the device is on.
How to fix it. No action is needed from the developers' side.
What bulletin to brandish. The purchase cannot be completed. Please, change your account or device.
SKError.Code.paymentCancelled, code 2
What it means. The user got to the payment screen, but changed his mind well-nigh making a buy and clicked "cancel".
How to prepare information technology. From a technical point of view, no error occurred and, in this case, nada needs to be done. From a marketing point of view, you lot tin continue working with such a user, for example, offer him a discount.
What bulletin to display. You take two options here. The easiest one is non to show anything. However, you tin can besides try winning a user back with a message similar this: "You have canceled your purchase. Are you lot interested in trying a subscription at a discounted price?"
SKError.Code.paymentInvalid, code iii
What it means. For some reason, the payment failed: the card had expired or there were not plenty funds for this buy.
How to fix information technology. No activity is needed from the developers' side.
What message to display. Your purchase was declined. Delight, bank check the payment details and make certain there are enough funds in your account.
SKError.Lawmaking.paymentNotAllowed, code 4
What it means. Probably, this carte du jour has some purchase restrictions available: limits are set or the online shopping function is unavailable.
How to set up it. No activeness is needed from the developers' side.
What message to display. The purchase is non bachelor for the selected payment method. Please, make sure your payment method allows you to make online purchases.
SKError.Code.storeProductNotAvailable, lawmaking 5
What it ways. The user is trying to buy a product that is not bachelor for the region in which this store is used.
How to ready it. The programmer needs to bank check products for their availability in the user'southward store and region. For this, you can use SKStorefront.
What message to display. This product is not available in your region. Please, change the shop and try again.
SKError.Code.cloudServicePermissionDenied, code vi
What it ways. The user didn't give access to the information of his Deject service.
How to prepare it. No activity is needed from the developers' side.
What message to display. To exist honest, I have never met such an fault. Actually, you tin just write that the purchase was declined.
SKError.Code.cloudServiceNetworkConnectionFailed, lawmaking seven
What it means. The device was non connected to the Internet when making a purchase.
How to fix it. No action is needed from the developers' side.
What message to display. The purchase cannot be completed because your device is non connected to the Cyberspace. Please, try again later with a stable cyberspace connection.
SKError.Code.cloudServiceRevoked, code 8
What it ways. This device doesn't have access to the StoreKit payment service. Commonly, this error occurs in Sandbox.
How to fix information technology. Create a new Sandbox user or just try repeating the operation.
What message to brandish. Sorry, an error has occurred.
SKError.Code.privacyAcknowledgementRequired, code 9
What it ways. The user didn't accept the terms of use in the AppStore. As it's said in the documentation, "the user has not yet acknowledged Apple's privacy policy for Apple Music". But it looks similar an fault, because there is no reason to mention Apple Music here.
How to fix information technology. No activity is needed from the developers' side.
What message to display. The buy cannot be completed because yous have non accepted the terms of utilize of the AppStore. Please, confirm your consent in the settings so return to the purchase.
SKError.Code.unauthorizedRequestData, lawmaking ten
What it means. Your app ID doesn't contain the required entitlement for using StoreKit.
How to fix information technology. You need to end the setup process of in-app purchases for your app.
What message to display. An error has occurred. Please, try once again later on.
SKError.Code.invalidOfferIdentifier, lawmaking eleven
What information technology means. The user is trying to buy a product with an wrong promotional offer.
How to set it. No activeness is needed from the developers' side.
What bulletin to display. The promotional offer is invalid or expired.
SKError.Lawmaking.invalidSignature, code 12
What it ways. The signature for the promotional offering for the StoreKit request was generated incorrectly.
How to fix information technology. Check how the signature is generated and gear up the errors. If you use Adapty, download the Subscription Key.
What message to display. Deplorable, an error has occurred when applying the promo code. Please, effort once again afterwards.
SKError.Lawmaking.missingOfferParams, code 13
What it ways. Parameters of the promotional offer are formed incorrectly.
How to gear up it. Check and correct the parameters of your promotional offer.
What bulletin to brandish. Sad, an error has occurred when applying the promo offer. Please, try again subsequently.
SKError.Code.invalidOfferPrice, lawmaking fourteen
What it means. The user is trying to buy a product with an irrelevant price. Probably, the price displayed in the AppStore is no longer valid.
How to ready it. Set the updated cost for this offer in the AppStore.
What message to display. Sorry, your purchase cannot be completed. Please, try again after.
Determination
Correct error handling improves user experience and tin can render at least some of those users who could not pay for the subscription immediately for some reason. These are the most mutual mistakes when implementing purchases in an iOS app:
- SKError.Code.unknown, an unknown error;
- SKError.Code.paymentCancelled, when the user cancels the purchase;
- SKError.Code.paymentInvalid, when the payment can't be processed.
Really, error treatment and purchase implementation are cumbersome processes. So I would recommend trying Adapty SDK for iOS, which makes implementing in-app purchases easier and provides other benefits, such equally subscription analytics, cohort analysis, a/b tests for paywalls, and server-side receipt validation.
Source: https://adapty.io/blog/ios-in-app-purchases-part-5-list-of-skerror-codes-and-how-to-handle-them
0 Response to "Apl an Error Occurred and Your Request Could Not Be Completed Please Try Again Later"
Post a Comment