Skip to content Skip to sidebar Skip to footer

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 fifth commodity in a series. Follow the links to read previous articles:

  1. ‍iOS in-app purchases, role 1: configuration and adding to the project.
  2. iOS in-app purchases, part 2: initialization and purchases processing.
  3. iOS in-app purchases, part 3: testing purchases in XCode.
  4. iOS in-app purchases, part four: server-side receipt validation.
  5. iOS in-app purchases: the list of SKError codes and how to handle them.

In this post, I will address the SKErrors: what problems they imply and what to do about them. For each mistake, we will work out three aspects: why it occurs, how to handle them, and what message to display in the error notification.

⭐️ Download our guide on in-app techniques which will make in-app purchases in your app perfect

SKError.Code.unknown, code 0

What it means. An error occurred for an unknown reason.

How to fix it. No action is needed from the developers' side. This fault also comes on a request when trying to become products when using the iOS fourteen and in a higher place simulator. In this example, to get a production, utilize the StoreKit local testing or a existent device/emulator with the iOS version below iOS 14.

What message to display. Sorry, the purchase is unavailable for an unknown reason. Please endeavour again later on.

SKError.Code.clientInvalid, lawmaking 1

What it ways. The user cannot make a purchase. For example, a child tries to buy something when the parental control function on the device is on.

How to fix it. No activity is needed from the developers' side.

What message to display. The purchase cannot be completed. Please, modify your business relationship or device.

SKError.Code.paymentCancelled, lawmaking two

What it means. The user got to the payment screen, but changed his mind well-nigh making a purchase and clicked "cancel".

How to fix information technology. From a technical point of view, no mistake occurred and, in this example, nada needs to be done. From a marketing point of view, y'all can continue working with such a user, for example, offer him a discount.

What message to display. Yous have ii options here. The easiest one is non to show anything. However, you can also try winning a user back with a message like this: "You have canceled your purchase. Are you interested in trying a subscription at a discounted price?"

SKError.Lawmaking.paymentInvalid, code three

What it means. For some reason, the payment failed: the menu had expired or there were not plenty funds for this purchase.

How to ready it. No action is needed from the developers' side.

What message to display. Your purchase was declined. Please, check the payment details and make sure at that place are enough funds in your account.

SKError.Code.paymentNotAllowed, code 4

What it means. Probably, this carte has some purchase restrictions bachelor: limits are ready or the online shopping function is unavailable.

How to gear up information technology. No action is needed from the developers' side.

What bulletin to display. The purchase is non available for the selected payment method. Please, brand sure your payment method allows you to make online purchases.

SKError.Code.storeProductNotAvailable, code 5

What it means. The user is trying to buy a product that is not available for the region in which this store is used.

How to prepare it. The developer needs to check products for their availability in the user'due south store and region. For this, you can use SKStorefront.

What message to display. This production is not available in your region. Please, modify the store and try once again.

SKError.Code.cloudServicePermissionDenied, code 6

What information technology means. The user didn't give access to the information of his Cloud service.

How to prepare information technology. No activeness is needed from the developers' side.

What message to display. To exist honest, I have never met such an error. Actually, you can merely write that the purchase was declined.

SKError.Code.cloudServiceNetworkConnectionFailed, code seven

What it means. The device was not connected to the Internet when making a purchase.

How to fix it. No action is needed from the developers' side.

What bulletin to display. The buy cannot be completed considering your device is not continued to the Internet. Please, attempt again later with a stable internet connection.

Start for free

Adapty handles all SKErrors automatically,

as well every bit provides the server-side validation and covers all side cases

Start for free

SKError.Code.cloudServiceRevoked, code 8

What it ways. This device doesn't have access to the StoreKit payment service. Ordinarily, this error occurs in Sandbox.

How to set it. Create a new Sandbox user or just try repeating the operation.

What message to display. Sorry, an error has occurred.

SKError.Code.privacyAcknowledgementRequired, code nine

What it ways. The user didn't have the terms of use in the AppStore. As it's said in the documentation, "the user has not yet best-selling Apple's privacy policy for Apple Music". But it looks similar an mistake, because in that location is no reason to mention Apple tree Music here.

How to gear up information technology. No activity is needed from the developers' side.

What message to display. The buy cannot exist completed considering y'all accept not accepted the terms of use of the AppStore. Delight, confirm your consent in the settings and so return to the purchase.

SKError.Code.unauthorizedRequestData, lawmaking 10

What it means. Your app ID doesn't contain the required entitlement for using StoreKit.

How to fix information technology. You lot need to cease the setup process of in-app purchases for your app.

What message to display. An fault has occurred. Please, try once again later.

SKError.Lawmaking.invalidOfferIdentifier, code 11

What it ways. The user is trying to buy a product with an wrong promotional offer.

How to set information technology. No action is needed from the developers' side.

What message to display. The promotional offer is invalid or expired.

SKError.Lawmaking.invalidSignature, code 12

What it means. The signature for the promotional offer for the StoreKit request was generated incorrectly.

How to fix information technology. Check how the signature is generated and fix the errors. If yous use Adapty, download the Subscription Key.

What message to display. Sorry, an mistake has occurred when applying the promo code. Please, effort again later.

SKError.Lawmaking.missingOfferParams, code 13

What it means. Parameters of the promotional offer are formed incorrectly.

How to ready it. Bank check and correct the parameters of your promotional offer.

What message to display. Sorry, an error has occurred when applying the promo offer. Please, try again later.

SKError.Code.invalidOfferPrice, code xiv

What it means. The user is trying to buy a product with an irrelevant price. Probably, the cost displayed in the AppStore is no longer valid.

How to fix it. Set the updated toll for this offer in the AppStore.

What bulletin to display. Sorry, your buy cannot be completed. Please, effort again later on.

Decision

Correct fault handling improves user feel and can return at least some of those users who could non pay for the subscription immediately for some reason. These are the virtually common mistakes when implementing purchases in an iOS app:

  • SKError.Lawmaking.unknown, an unknown error;
  • SKError.Code.paymentCancelled, when the user cancels the purchase;
  • SKError.Code.paymentInvalid, when the payment can't exist processed.

Really, error handling and buy implementation are cumbersome processes. And then I would recommend trying Adapty SDK for iOS, which makes implementing in-app purchases easier and provides other benefits, such every bit subscription analytics, cohort analysis, a/b tests for paywalls, and server-side receipt validation.

trudellstorthe.blogspot.com

Source: https://adapty.io/blog/ios-in-app-purchases-part-5-list-of-skerror-codes-and-how-to-handle-them

Post a Comment for "Apl an Error Occurred and Your Request Could Not Be Completed Please Try Again Later"