kCFURLErrorHTTPTooManyRedirects = -1007, kCFURLErrorUnknown = -998,
kCFURLErrorCancelled = -999,
kCFURLErrorBadURL = -1000,
kCFURLErrorTimedOut = -1001,
kCFURLErrorUnsupportedURL = -1002,
kCFURLErrorCannotFindHost = -1003,
kCFURLErrorCannotConnectToHost = -1004,
kCFURLErrorNetworkConnectionLost = -1005,
kCFURLErrorDNSLookupFailed = -1006,
kCFURLErrorHTTPTooManyRedirects = -1007,
kCFURLErrorResourceUnavailable = -1008,
kCFURLErrorNotConnectedToInternet = -1009,
kCFURLErrorRedirectToNonExistentLocation = -1010,
kCFURLErrorBadServerResponse = -1011,
kCFURLErrorUserCancelledAuthentication = -1012,
kCFURLErrorUserAuthenticationRequired = -1013,
kCFURLErrorZeroByteResource = -1014,
kCFURLErrorCannotDecodeRawData = -1015,
kCFURLErrorCannotDecodeContentData = -1016,
kCFURLErrorCannotParseResponse = -1017,
kCFURLErrorInternationalRoamingOff = -1018,
kCFURLErrorCallIsActive = -1019,
kCFURLErrorDataNotAllowed = -1020,
kCFURLErrorRequestBodyStreamExhausted = -1021,
kCFURLErrorFileDoesNotExist = -1100,
kCFURLErrorFileIsDirectory = -1101,
kCFURLErrorNoPermissionsToReadFile = -1102,
kCFURLErrorDataLengthExceedsMaximum = -1103,
중요한 부분은 뒤의 숫자 부분으로 숫자를 대조해서 비교해보면 될것 같습니다.
chirag04/react-native-in-app-utils#15
// Mapping from error codes returned by In-App-Utils to Apple's StoreKit errors.
// See: https://developer.apple.com/documentation/storekit/skerror.code
// NOTE: RCTJSErrorFromNSError prepends ESKERRORDOMAIN to make errors unique across
// iOS domains.
var STORE_KIT_ERRORS = {
ESKERRORDOMAIN0: 'unknown',
ESKERRORDOMAIN1: 'client_invalid',
ESKERRORDOMAIN2: 'payment_canceled',
ESKERRORDOMAIN3: 'payment_invalid',
ESKERRORDOMAIN4: 'payment_not_allowed',
ESKERRORDOMAIN5: 'store_product_not_available',
ESKERRORDOMAIN6: 'cloud_service_permission_denied',
ESKERRORDOMAIN7: 'cloud_service_network_connection_failed',
ESKERRORDOMAIN8: 'unknown'
};
The "Your account info has changed" message indicates that you are signed in the iTunes Store with your test user account on your device. Sandbox test user accounts become unusable once you use them to log in to a production environment. To resolve this error, sign out of iTunes & App Stores in the Settings application on your device, create a new test user account in iTunes Connect, and use it when prompted by StoreKit to confirm a purchase from within your app.
The "Cannot connect to iTunes Store" issue may be due to one or more of the following reasons:
- The sandbox may be unreachable.
- Your app does not have a bundle version (CFBundleVersion). See Setting the Version Number and Build String for more information.
- Your app is running in the Simulator, which does not support in-app purchase.
- You are attempting to purchase a product that is unavailable for sale. See Query the App Store for product information before presenting your app’s store UI for more information.
The "This Apple ID has not yet been used in this iTunes Store" message indicates that you are signed in the iTunes Store with your test user account on your device. See Your account info has changed for more information on how to resolve this issue.
The "You've already purchased this. Tap OK to download it again for free." message is a notification rather than an error. It indicates that you are attempting to purchase a non-consumable product that you have already bought. You are not charged when purchasing an already bought non-consumable product.
The "You've already purchased this. Would you like to get it again for free?" message indicates that you are attempting to purchase a non-consumable product that you have already bought. You are not charged when purchasing an already bought non-consumable product.
The "This In-App Purchase has already been bought. It will be restored for free." message indicates that you did not call SKPaymentQueue 's finishTransaction: in your application. Calling finishTransaction: allows you to remove a transaction from the payment queue.
You are getting the "You've already purchased this In-App Purchase but it hasn't been downloaded." message because you did not call SKPaymentQueue's finishTransaction: in your application. Calling finishTransaction: allows you to remove a transaction from the payment queue.
You are getting the "This is not a test user account. Please create a new account in the Sandbox environment." message because you signed in with your iTunes user account when prompted by StoreKit to confirm a purchase. To resolve this error, sign out of iTunes & App Stores in the Settings application on your device and use your sandbox test user account when prompted by StoreKit to confirm a purchase.