为了账号安全,请及时绑定邮箱和手机立即绑定

使用StoreKit的未记录的NSURLErrorDomain错误代码(-1001,-1003

使用StoreKit的未记录的NSURLErrorDomain错误代码(-1001,-1003

iOS
繁星淼淼 2019-12-09 09:23:33
我正在编写与StoreKit相关的代码,当我尝试将购买添加到队列时,我得到了一些相当麻烦的错误代码。到目前为止,我遇到了错误代码-1003和-1004,但在Internet上找不到任何有关这些代码的信息。运行产品请求会返回有效的产品编号,因此我不知道为什么调用[[SKPaymentQueue defaultQueue] addPayment:aPayment];此未记录问题会失败。相同的代码也可以在没有错误的情况下在一个设备上运行,而在另一台设备上则没有错误。到目前为止,我的问题尚未得到解答:这些代码是什么意思?我该如何缓解这个问题?为什么发生这种情况是因为尝试购买而不是出于产品请求?我已经完成的故障排除包括重新生成签名证书和配置文件,更改WiFi网络,清理和构建并重新安装所有相关软件和组件,而这些事情单独或一起都无助于解决问题。编辑:在Apple开发人员论坛上找到了有关此问题的讨论,但是Apple没人回应:https : //devforums.apple.com/thread/107121? tstart =75(需要iOS开发人员帐户才能查看)编辑:今天,我遇到了错误代码-1001,将其添加到此莫名其妙和间歇性问题列表中。我仍然找不到苹果的问责制。编辑:我怀疑这些错误代码是随机生成的,实际上仅表示沙盒已关闭。还有其他人遇到这个问题吗?
查看完整描述

3 回答

?
12345678_0001

TA贡献1802条经验 获得超5个赞

所有错误代码均在文档的“ CFNetwork错误代码参考”中(链接)


一小部分提取CFURL和CFURLConnection错误:


  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,


查看完整回答
反对 回复 2019-12-09
?
小怪兽爱吃肉

TA贡献1852条经验 获得超1个赞

参见NSURLError.h定义


NSURLErrorUnknown =             -1,

NSURLErrorCancelled =           -999,

NSURLErrorBadURL =              -1000,

NSURLErrorTimedOut =            -1001,

NSURLErrorUnsupportedURL =          -1002,

NSURLErrorCannotFindHost =          -1003,

NSURLErrorCannotConnectToHost =         -1004,

NSURLErrorNetworkConnectionLost =       -1005,

NSURLErrorDNSLookupFailed =         -1006,

NSURLErrorHTTPTooManyRedirects =        -1007,

NSURLErrorResourceUnavailable =         -1008,

NSURLErrorNotConnectedToInternet =      -1009,

NSURLErrorRedirectToNonExistentLocation =   -1010,

NSURLErrorBadServerResponse =       -1011,

NSURLErrorUserCancelledAuthentication =     -1012,

NSURLErrorUserAuthenticationRequired =  -1013,

NSURLErrorZeroByteResource =        -1014,

NSURLErrorCannotDecodeRawData =             -1015,

NSURLErrorCannotDecodeContentData =         -1016,

NSURLErrorCannotParseResponse =             -1017,

NSURLErrorAppTransportSecurityRequiresSecureConnection NS_ENUM_AVAILABLE(10_11, 9_0) = -1022,

NSURLErrorFileDoesNotExist =        -1100,

NSURLErrorFileIsDirectory =         -1101,

NSURLErrorNoPermissionsToReadFile =     -1102,

NSURLErrorDataLengthExceedsMaximum NS_ENUM_AVAILABLE(10_5, 2_0) =   -1103,


// SSL errors

NSURLErrorSecureConnectionFailed =      -1200,

NSURLErrorServerCertificateHasBadDate =     -1201,

NSURLErrorServerCertificateUntrusted =  -1202,

NSURLErrorServerCertificateHasUnknownRoot = -1203,

NSURLErrorServerCertificateNotYetValid =    -1204,

NSURLErrorClientCertificateRejected =   -1205,

NSURLErrorClientCertificateRequired =   -1206,

NSURLErrorCannotLoadFromNetwork =       -2000,


// Download and file I/O errors

NSURLErrorCannotCreateFile =        -3000,

NSURLErrorCannotOpenFile =          -3001,

NSURLErrorCannotCloseFile =         -3002,

NSURLErrorCannotWriteToFile =       -3003,

NSURLErrorCannotRemoveFile =        -3004,

NSURLErrorCannotMoveFile =          -3005,

NSURLErrorDownloadDecodingFailedMidStream = -3006,

NSURLErrorDownloadDecodingFailedToComplete =-3007,


NSURLErrorInternationalRoamingOff NS_ENUM_AVAILABLE(10_7, 3_0) =         -1018,

NSURLErrorCallIsActive NS_ENUM_AVAILABLE(10_7, 3_0) =                    -1019,

NSURLErrorDataNotAllowed NS_ENUM_AVAILABLE(10_7, 3_0) =                  -1020,

NSURLErrorRequestBodyStreamExhausted NS_ENUM_AVAILABLE(10_7, 3_0) =      -1021,


NSURLErrorBackgroundSessionRequiresSharedContainer NS_ENUM_AVAILABLE(10_10, 8_0) = -995,

NSURLErrorBackgroundSessionInUseByAnotherProcess NS_ENUM_AVAILABLE(10_10, 8_0) = -996,

NSURLErrorBackgroundSessionWasDisconnected NS_ENUM_AVAILABLE(10_10, 8_0)= -997,


查看完整回答
反对 回复 2019-12-09
  • 3 回答
  • 0 关注
  • 817 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信