iOS开发:苹果相关错误码

目录

  • NSCocoaErrorDomain
  • NSURLErrorDomain
  • SKErrorCode
  • SKANErrorDomain

NSError Codes

NSCocoaErrorDomain

所属库文件:Foundation/FoundationErrors.h

NS_ERROR_ENUM(NSCocoaErrorDomain) {// File system and file I/O related errors, with NSFilePathErrorKey or NSURLErrorKey containing path or URLNSFileNoSuchFileError = 4,                                              // Attempt to do a file system operation on a non-existent fileNSFileLockingError = 255,                                               // Couldn't get a lock on fileNSFileReadUnknownError = 256,                                           // Read error (reason unknown)NSFileReadNoPermissionError = 257,                                      // Read error (permission problem)NSFileReadInvalidFileNameError = 258,                                   // Read error (invalid file name)NSFileReadCorruptFileError = 259,                                       // Read error (file corrupt, bad format, etc)NSFileReadNoSuchFileError = 260,                                        // Read error (no such file)NSFileReadInapplicableStringEncodingError = 261,                        // Read error (string encoding not applicable) also NSStringEncodingErrorKeyNSFileReadUnsupportedSchemeError = 262,                                 // Read error (unsupported URL scheme)NSFileReadTooLargeError = 263,             // Read error (file too large)NSFileReadUnknownStringEncodingError = 264, // Read error (string encoding of file contents could not be determined)NSFileWriteUnknownError = 512,                                          // Write error (reason unknown)NSFileWriteNoPermissionError = 513,                                     // Write error (permission problem)NSFileWriteInvalidFileNameError = 514,                                  // Write error (invalid file name)NSFileWriteFileExistsError = 516,          // Write error (file exists)NSFileWriteInapplicableStringEncodingError = 517,                       // Write error (string encoding not applicable) also NSStringEncodingErrorKeyNSFileWriteUnsupportedSchemeError = 518,                                // Write error (unsupported URL scheme)NSFileWriteOutOfSpaceError = 640,                                       // Write error (out of disk space)NSFileWriteVolumeReadOnlyError = 642,      // Write error (readonly volume)// NSFileManager unmount errorsNSFileManagerUnmountUnknownError = 768,    // The volume could not be unmounted (reason unknown)NSFileManagerUnmountBusyError = 769,       // The volume could not be unmounted because it is in use// Other errorsNSKeyValueValidationError = 1024,                                       // KVC validation errorNSFormattingError = 2048,                                               // Formatting errorNSUserCancelledError = 3072,                                            // User cancelled operation (this one often doesn't deserve a panel and might be a good one to special case)NSFeatureUnsupportedError = 3328,          // Feature unsupported error// Executable loading errorsNSExecutableNotLoadableError = 3584,           // Executable is of a type that is not loadable in the current processNSExecutableArchitectureMismatchError = 3585,  // Executable does not provide an architecture compatible with the current processNSExecutableRuntimeMismatchError = 3586,       // Executable has Objective C runtime information incompatible with the current processNSExecutableLoadError = 3587,                  // Executable cannot be loaded for some other reason, such as a problem with a library it depends onNSExecutableLinkError = 3588,                  // Executable fails due to linking issues// Inclusive error range definitions, for checking future error codesNSFileErrorMinimum = 0,NSFileErrorMaximum = 1023,NSValidationErrorMinimum = 1024,NSValidationErrorMaximum = 2047,NSExecutableErrorMinimum = 3584,NSExecutableErrorMaximum = 3839,NSFormattingErrorMinimum = 2048,NSFormattingErrorMaximum = 2559,NSPropertyListReadCorruptError = 3840,         // Error parsing a property listNSPropertyListReadUnknownVersionError = 3841,  // The version number in the property list is unknownNSPropertyListReadStreamError = 3842,          // Stream error reading a property listNSPropertyListWriteStreamError = 3851,         // Stream error writing a property listNSPropertyListWriteInvalidError = 3852,       // Invalid property list object or invalid property list type specified when writingNSPropertyListErrorMinimum = 3840,NSPropertyListErrorMaximum = 4095,NSXPCConnectionInterrupted = 4097,NSXPCConnectionInvalid = 4099,NSXPCConnectionReplyInvalid = 4101,NSXPCConnectionCodeSigningRequirementFailure = 4102,NSXPCConnectionErrorMinimum = 4096,NSXPCConnectionErrorMaximum = 4224,NSUbiquitousFileUnavailableError = 4353, // NSURLUbiquitousItemDownloadingErrorKey contains an error with this code when the item has not been uploaded to iCloud by the other devices yetNSUbiquitousFileNotUploadedDueToQuotaError = 4354, // NSURLUbiquitousItemUploadingErrorKey contains an error with this code when the item has not been uploaded to iCloud because it would make the account go over-quotaNSUbiquitousFileUbiquityServerNotAvailable = 4355, // NSURLUbiquitousItemDownloadingErrorKey and NSURLUbiquitousItemUploadingErrorKey contain an error with this code when connecting to the iCloud servers failedNSUbiquitousFileErrorMinimum = 4352,NSUbiquitousFileErrorMaximum = 4607,NSUserActivityHandoffFailedError = 4608,	// The data for the user activity was not available (e.g. if the remote device became unavailable.)NSUserActivityConnectionUnavailableError = 4609,  // The user activity could not be continued because a required connection was not availableNSUserActivityRemoteApplicationTimedOutError = 4610, // The remote application failed to send data in timeNSUserActivityHandoffUserInfoTooLargeError = 4611, // The NSUserActivity userInfo dictionary was too large to receiveNSUserActivityErrorMinimum = 4608,NSUserActivityErrorMaximum = 4863,NSCoderReadCorruptError = 4864, // Error parsing data during decodeNSCoderValueNotFoundError = 4865, // Data requested was not foundNSCoderInvalidValueError = 4866, // Data was not valid to encodeNSCoderErrorMinimum = 4864,NSCoderErrorMaximum = 4991,NSBundleErrorMinimum = 4992,NSBundleErrorMaximum = 5119,NSBundleOnDemandResourceOutOfSpaceError = 4992, // There was not enough space available to download the requested On Demand Resources.NSBundleOnDemandResourceExceededMaximumSizeError = 4993, // The application exceeded the amount of On Demand Resources content in use at one timeNSBundleOnDemandResourceInvalidTagError = 4994, // The application specified a tag which the system could not find in the application tag manifestNSCloudSharingNetworkFailureError = 5120,        // Sharing failed due to a network failure.NSCloudSharingQuotaExceededError = 5121,         // The user doesn't have enough storage space available to share the requested items.NSCloudSharingTooManyParticipantsError = 5122,   // Additional participants could not be added to the share, because the limit was reached.NSCloudSharingConflictError = 5123,              // A conflict occurred while trying to save changes to the CKShare and/or root CKRecord. Respond to this error by first fetching the server's changes to the records, then either handle the conflict manually or present it, which will instruct the user to try the operation again.NSCloudSharingNoPermissionError = 5124,         // The current user doesn't have permission to perform the requested actions.NSCloudSharingOtherError = 5375,                 // These errors may require application-specific responses. For CloudKit sharing, use the NSUnderlyingErrorKey, which is a CKErrorDomain error, to discover the specific error and refer to the CloudKit documentation for the proper response to these errors.NSCloudSharingErrorMinimum = 5120,NSCloudSharingErrorMaximum = 5375,NSCompressionFailedError = 5376,NSDecompressionFailedError = 5377,NSCompressionErrorMinimum = 5376,NSCompressionErrorMaximum = 5503,};

NSURLErrorDomain

所属库文件:Foundation/NSURLError.h

NS_ERROR_ENUM(NSURLErrorDomain)
{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 = -1022,NSURLErrorFileDoesNotExist = 		-1100,NSURLErrorFileIsDirectory = 		-1101,NSURLErrorNoPermissionsToReadFile = 	-1102,NSURLErrorDataLengthExceedsMaximum =	-1103,NSURLErrorFileOutsideSafeArea = -1104,// SSL errorsNSURLErrorSecureConnectionFailed = 		-1200,NSURLErrorServerCertificateHasBadDate = 	-1201,NSURLErrorServerCertificateUntrusted = 	-1202,NSURLErrorServerCertificateHasUnknownRoot = -1203,NSURLErrorServerCertificateNotYetValid = 	-1204,NSURLErrorClientCertificateRejected = 	-1205,NSURLErrorClientCertificateRequired =	-1206,NSURLErrorCannotLoadFromNetwork = 		-2000,// Download and file I/O errorsNSURLErrorCannotCreateFile = 		-3000,NSURLErrorCannotOpenFile = 			-3001,NSURLErrorCannotCloseFile = 		-3002,NSURLErrorCannotWriteToFile = 		-3003,NSURLErrorCannotRemoveFile = 		-3004,NSURLErrorCannotMoveFile = 			-3005,NSURLErrorDownloadDecodingFailedMidStream = -3006,NSURLErrorDownloadDecodingFailedToComplete =-3007,NSURLErrorInternationalRoamingOff =         -1018,NSURLErrorCallIsActive =                    -1019,NSURLErrorDataNotAllowed =                  -1020,NSURLErrorRequestBodyStreamExhausted =      -1021,NSURLErrorBackgroundSessionRequiresSharedContainer = -995,NSURLErrorBackgroundSessionInUseByAnotherProcess = -996,NSURLErrorBackgroundSessionWasDisconnected = -997,
};

SKErrorCode

所属库文件:StoreKit/SKError.h

typedef NS_ENUM(NSInteger,SKErrorCode) {SKErrorUnknown,SKErrorClientInvalid,                                                                                       // client is not allowed to issue the request, etc.SKErrorPaymentCancelled,                                                                                    // user cancelled the request, etc.SKErrorPaymentInvalid,                                                                                      // purchase identifier was invalid, etc.SKErrorPaymentNotAllowed,                                                                                   // this device is not allowed to make the paymentSKErrorStoreProductNotAvailable API_AVAILABLE(ios(3.0), macos(10.15), watchos(6.2), visionos(1.0)),                        // Product is not available in the current storefrontSKErrorCloudServicePermissionDenied API_AVAILABLE(ios(9.3), tvos(9.3), watchos(6.2), macos(11.0), visionos(1.0)),          // user has not allowed access to cloud service informationSKErrorCloudServiceNetworkConnectionFailed API_AVAILABLE(ios(9.3), tvos(9.3), watchos(6.2), macos(11.0), visionos(1.0)),   // the device could not connect to the neworkSKErrorCloudServiceRevoked API_AVAILABLE(ios(10.3), tvos(10.3), watchos(6.2), macos(11.0), visionos(1.0)),                 // user has revoked permission to use this cloud serviceSKErrorPrivacyAcknowledgementRequired API_AVAILABLE(ios(12.2), tvos(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),   // The user needs to acknowledge Apple's privacy policySKErrorUnauthorizedRequestData API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),                      // The app is attempting to use SKPayment's requestData property, but does not have the appropriate entitlementSKErrorInvalidOfferIdentifier API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),                       // The specified subscription offer identifier is not validSKErrorInvalidSignature API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),                             // The cryptographic signature provided is not validSKErrorMissingOfferParams API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),                           // One or more parameters from SKPaymentDiscount is missingSKErrorInvalidOfferPrice API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),                            // The price of the selected offer is not valid (e.g. lower than the current base subscription price)SKErrorOverlayCancelled API_AVAILABLE(ios(12.2), macos(10.14.4), watchos(6.2), visionos(1.0)),SKErrorOverlayInvalidConfiguration API_AVAILABLE(ios(14.0), visionos(1.0)) API_UNAVAILABLE(macos, watchos) __TVOS_PROHIBITED,SKErrorOverlayTimeout API_AVAILABLE(ios(14.0), visionos(1.0)) API_UNAVAILABLE(macos, watchos) __TVOS_PROHIBITED,SKErrorIneligibleForOffer API_AVAILABLE(ios(14.0), macos(11.0), watchos(7.0), visionos(1.0)),                              // User is not eligible for the subscription offerSKErrorUnsupportedPlatform API_AVAILABLE(ios(14.0), macos(11.0), watchos(7.0), visionos(1.0)) __TVOS_PROHIBITED,SKErrorOverlayPresentedInBackgroundScene API_AVAILABLE(ios(14.5), visionos(1.0)) API_UNAVAILABLE(macos, watchos) __TVOS_PROHIBITED  // Client tried to present an SKOverlay in UIWindowScene not in the foreground
} API_AVAILABLE(ios(3.0), macos(10.7), watchos(6.2), visionos(1.0));

SKANErrorDomain

所属库文件:StoreKit/SKANError.h

typedef NS_ERROR_ENUM(SKANErrorDomain, SKANError) {SKANErrorImpressionMissingRequiredValue = 0,SKANErrorUnsupported                    = 1,SKANErrorAdNetworkIdMissing             = 2,SKANErrorMismatchedSourceAppId          = 3,SKANErrorImpressionNotFound             = 4,SKANErrorInvalidCampaignId              = 5,SKANErrorInvalidConversionValue         = 6,SKANErrorInvalidSourceAppId             = 7,SKANErrorInvalidAdvertisedAppId         = 8,SKANErrorInvalidVersion                 = 9,SKANErrorUnknown                        = 10,SKANErrorImpressionTooShort             = 11,
} API_AVAILABLE(ios(15.4), visionos(1.0)) API_UNAVAILABLE(macos,watchos) __TVOS_PROHIBITED;

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/218979.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【NSX-T】2. 搭建NSX-T环境 —— 配置 NSX-T 基本设置

目录 2. 配置 NSX-T 基本设置2.1 访问 NSX Manager UI2.2 添加和查看 NSX Manager 许可证2.3 设置用户界面模式 参考资料 2. 配置 NSX-T 基本设置 2.1 访问 NSX Manager UI 打开跳板机浏览器,在URL中输入:https://192.168.1.23/ 或 https://manager32.…

【教程】 Vue混淆加密与还原

目录 引言 混淆 使用ipaguard来对程序进行加固 还原 总结 参考资料 引言 Vue是一种流行的JavaScript框架,用于构建用户界面。它简单易用且功能强大,备受开发者喜爱。然而,在传输和存储过程中,我们需要保护Vue代码的安全性。混…

centos7中的管道和重定向

重定向 0 标准输入 1 标准输出 2 标准错误 3 进程在执行的过程中打开的其他文件 & 标准正确和标准错误的混合输出 输出重定向 &g…

【Linux】锁的简单封装以及原理解析

文章目录 一、锁的原理过程1:过程2过程3过程4 二、 锁的简单封装1.LockGuard.hpp2.使用1.正常锁的使用2.使用封装后的 总结 一、锁的原理 为了实现互斥锁操作,大多数体系结构都提供了swap或exchange指令,该指令的作用是把寄存器和内存单元的数据相交换,由于只有一条…

算法Day31 房间收纳

房间收纳 Description 对于零落的玩具,你需要进行收纳,为了将最多的玩具进行收纳,请你合理分配收纳柜和房间数量。 请你将一些玩具收纳在一个房间中,给你一个二维数组 roomTypes,其中的roomTypes[i] {numberOfBoxes_…

Narak

靶场下载 https://download.vulnhub.com/ha/narak.ova 信息收集 # nmap -sn 192.168.1.0/24 -oN live.nmap Starting Nmap 7.94 ( https://nmap.org ) at 2023-12-09 22:18 CST Nmap scan report for 192.168.1.1 (192.168.1.1) Host is up (0.…

【模型训练】声音克隆

【模型训练】声音克隆

AI智能视界,视频监控技术的革新与突破

智能视频监控概述 TSINGSEE青犀智能监控系统是通过摄像头采集视频数据,经过压缩技术处理后传输至服务器,再由服务器进行存储和管理并汇聚到EasyCVR视频融合平台之中,进行统一的分发处理。采用先进的视频压缩技术,确保视频质量&am…

锂电池基础知识及管理方式总结

这两天在排查一个锂电池无法充电的问题,用的是电池管理芯片BQ25713,网上相关的资料也很少,查看数据手册时,里面也有很多术语参数等不是很理解,所以,在此对锂电池的基础知识做个简单的总结,方面后…

react中的setState是同步还是异步

setState 只在合成事件和钩子函数中是“异步”的,在原生事件和 setTimeout 中都是同步的。 合成事件:就是react 在组件中的onClick等都是属于它自定义的合成事件 原生事件:比如通过addeventListener添加的,dom中的原生事件 setS…

如何通过控制台排查定位EasyCore?

过去当数据库出现了问题,我们只能通过日志去查看问题,可能是数据库有了重启、主节点发生了漂移或查询语句太复杂,这一整套逻辑走下来只能winsen, karel。 我们经常说数据库负载过高,请求很多,但我们却不能直接告诉哪个…

python常见代码用法

1.result [[]] * n 和 result [[] for _ in range(n)] 辨析 n 3 result [[]] * nprint(result) # 输出:[[], # [], # []]print(result[0] is result[1] is result[2]) # 输出:True* 运算符进行复制,这些空列表实际…

MacOS系统使用ESP8266(CP2102)开发板

开发板实物 连接开发板到macos 终端输入lsusb查看,开发板硬件成功识别 打开Arduino IDE并选择开发板 开发板连接成功 编译代码 上传成功 打开串口监视器,按一下RST键,可看到WIFI名输出及WIFI的IP输出 WIFI热点功能启用

Ray使用备注

Ray使用备注 框架介绍 Ray是一种python分布式任务调度框架其支持 无状态的任务并发执行,也支持 有状态的任务按照一定顺序执行其支持 分布式调度器,在一个节点上创建的任务先给本节点的局部调度器,并让本节点自己处理,当资源不够时,再将任务发给全局调度器供其他节点处理其支…

Python 自动化之修理PDF文件(二)

PDF文件_合并与拆分PDF文档Pro版本 文章目录 PDF文件_合并与拆分PDF文档Pro版本前言一、要做成什么样子二、主要用到的函数三、基本思路1.引入库2.创建用户输入模块3.确定主框架 四、文档合并代码模块1.用户输入和函数调用2.引导用户输入文档信息3.合并文档内容4.命名新文档生成…

CMake 构建指南:如何提高 C-C++ 项目的可维护性

如果您是一位 C/C 开发人员,那么您一定知道在编写和维护大型项目时所面临的挑战。这些项目通常包含大量的源代码、库和依赖项,需要耗费大量的时间和精力才能构建和维护。在这种情况下,使用自动化工具可以大大减轻您的负担,提高项目…

传输层协议:TCP协议和UDP协议

文章目录 传输层协议:TCP协议和UDP协议一、TCP协议介绍(面向连接,稳定,慢)1、TCP特性2、TCP报文格式3、TCP三次握手4、TCP四次挥手5、常用的TCP端口号及其功能 二、UDP协议介绍(无连接,不稳定&a…

【ET8】4.ET8入门-ECS解析

ECS ECS组件生命周期 参考连接 ⼀种类ECS设计范式的介绍 3.3一切皆实体 4.1组件式设计 【ET框架课程】04-Entity&Component&System_哔哩哔哩_bilibili 【ET框架课程】05-ECS组件生命周期_哔哩哔哩_bilibili

深度学习学习顺序梳理

https://www.bilibili.com/video/BV1to4y1G7xq/?spm_id_from333.999.0.0&vd_source9607a6d9d829b667f8f0ccaaaa142fcb 1.吴恩达机器学习课程 已学完,时间较久了,后续可以重新听一遍,整理一下笔记 2. 白板推导读西瓜书 统计学习方法看…

GitHub入门命令介绍

GitHub是当今最受欢迎的代码托管平台之一,它提供了强大的版本控制和协作功能。 对于初学者来说,熟悉GitHub的基本命令非常重要。下面介绍一些常用的GitHub命令。 一、安装Git 1. Windows系统:在Windows上使用GitHub之前,您需要先…