peachsim 0.1.1692 → 0.1.1716

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (991) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +59 -3
  3. package/cli/app-bundle-resources.ts +3 -1
  4. package/cli/app-catalog.ts +10 -0
  5. package/cli/app-fonts.ts +1 -1
  6. package/cli/app-stubs.ts +19 -9
  7. package/cli/bridge-diagnostics.ts +2 -1
  8. package/cli/bridge-flow-runner.ts +61 -39
  9. package/cli/cloud-client.ts +6 -3
  10. package/cli/commands/agent-wrapper.ts +21 -10
  11. package/cli/commands/control.ts +149 -46
  12. package/cli/commands/coverage-swift.ts +19 -1
  13. package/cli/commands/coverage.ts +1 -1
  14. package/cli/commands/detect.ts +85 -25
  15. package/cli/commands/doctor.ts +159 -20
  16. package/cli/commands/flow.ts +4 -1
  17. package/cli/commands/inspect/core.ts +176 -17
  18. package/cli/commands/inspect/settling.ts +17 -5
  19. package/cli/commands/inspect/wait-ready.ts +7 -5
  20. package/cli/commands/inspect.ts +8 -2
  21. package/cli/commands/maestro-compare.ts +25 -99
  22. package/cli/commands/record.ts +263 -32
  23. package/cli/commands/screenshot.ts +2 -13
  24. package/cli/commands/test.ts +49 -101
  25. package/cli/current-sim.ts +4 -4
  26. package/cli/help-core.ts +3 -4
  27. package/cli/hints.ts +1 -6
  28. package/cli/maestro-compare.ts +172 -4
  29. package/cli/main.ts +8 -1
  30. package/cli/metro-bundle-assets.ts +77 -0
  31. package/cli/outbound-endpoints.ts +8 -12
  32. package/cli/run-registry.ts +0 -8
  33. package/cli/scene-video.ts +5 -3
  34. package/cli/ws-bridge.ts +56 -14
  35. package/detox/index.ts +76 -3
  36. package/detox/launch-permissions.ts +325 -0
  37. package/dist-lib/agent-daemon-client.cjs +2 -2
  38. package/dist-lib/agent-events.cjs +2 -2
  39. package/dist-lib/attached-projects.cjs +2 -2
  40. package/dist-lib/auth/shared-session.cjs +2 -2
  41. package/dist-lib/backend-origin.cjs +11 -10
  42. package/dist-lib/beta.cjs +2 -2
  43. package/dist-lib/beta.mjs +1 -1
  44. package/dist-lib/bridge-constants.cjs +6 -2
  45. package/dist-lib/bridge-contract-input.cjs +2 -2
  46. package/dist-lib/bridge-contract-input.mjs +1 -1
  47. package/dist-lib/bridge-contract.cjs +2 -2
  48. package/dist-lib/bridge-contract.mjs +1 -1
  49. package/dist-lib/bundle-channel.cjs +26769 -24228
  50. package/dist-lib/capture-contract.cjs +2 -2
  51. package/dist-lib/capture-contract.mjs +1 -1
  52. package/dist-lib/cloud-contract.cjs +2 -2
  53. package/dist-lib/cloud-contract.mjs +1 -1
  54. package/dist-lib/cloud-test-args.cjs +2 -2
  55. package/dist-lib/cloud-test-args.mjs +1 -1
  56. package/dist-lib/cloud.cjs +3 -2
  57. package/dist-lib/cloud.mjs +2 -1
  58. package/dist-lib/config.cjs +2 -2
  59. package/dist-lib/config.mjs +1 -1
  60. package/dist-lib/detox/index.cjs +256 -14
  61. package/dist-lib/dev-bundle-resolution.cjs +209 -51
  62. package/dist-lib/expo-swift-bundle.cjs +10795 -17575
  63. package/dist-lib/expo-swift-metadata.cjs +2 -2
  64. package/dist-lib/expo-swift-metadata.mjs +1 -1
  65. package/dist-lib/home-paths.cjs +2 -2
  66. package/dist-lib/host/bridge-host.cjs +36893 -31765
  67. package/dist-lib/host/fetch-proxy-handler.cjs +796 -114
  68. package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
  69. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  70. package/dist-lib/host/replacement-module-handler.cjs +3 -2
  71. package/dist-lib/host/websocket-proxy.cjs +312 -46
  72. package/dist-lib/index.cjs +2244 -642
  73. package/dist-lib/jump-to-source-babel.cjs +2 -2
  74. package/dist-lib/jump-to-source-native.cjs +2 -2
  75. package/dist-lib/kotlin-host.cjs +2 -2
  76. package/dist-lib/menu.cjs +5 -2
  77. package/dist-lib/menu.mjs +3 -1
  78. package/dist-lib/metro-fingerprint-registry.cjs +2 -2
  79. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  80. package/dist-lib/metro-production-bundle.cjs +2 -2
  81. package/dist-lib/metro-production-bundle.mjs +1 -1
  82. package/dist-lib/metro.cjs +2088 -612
  83. package/dist-lib/native-app-identity-project.cjs +863 -232
  84. package/dist-lib/native-app-identity-project.mjs +871 -234
  85. package/dist-lib/native-app-identity.cjs +15 -2
  86. package/dist-lib/native-app-identity.mjs +12 -1
  87. package/dist-lib/native-firebase-metadata.cjs +2 -2
  88. package/dist-lib/native-firebase-metadata.mjs +1 -1
  89. package/dist-lib/plist.cjs +2 -2
  90. package/dist-lib/plist.mjs +1 -1
  91. package/dist-lib/profiles.cjs +2 -2
  92. package/dist-lib/public-brand.cjs +2 -2
  93. package/dist-lib/public-origins-lib-esm.json +31 -100
  94. package/dist-lib/public-origins-lib.json +449 -453
  95. package/dist-lib/react-native-host-modules.cjs +98 -4
  96. package/dist-lib/react-native-host-modules.mjs +96 -3
  97. package/dist-lib/reap-browser.cjs +2 -2
  98. package/dist-lib/scripts/dev-server-scanner.cjs +225 -75
  99. package/dist-lib/sdk.cjs +146 -19
  100. package/dist-lib/sdk.mjs +139 -18
  101. package/dist-lib/skills.cjs +53577 -48467
  102. package/dist-lib/swift-compile.cjs +6111 -16733
  103. package/dist-lib/swift-compile.mjs +6052 -16681
  104. package/dist-lib/swift-package.cjs +104 -22
  105. package/dist-lib/swift-package.mjs +99 -21
  106. package/dist-lib/swift-submit.cjs +15 -5
  107. package/dist-lib/swift-submit.mjs +14 -4
  108. package/dist-lib/swift-toolchain.cjs +42 -13
  109. package/dist-lib/swift.cjs +2 -2
  110. package/dist-lib/vite-swift.cjs +13416 -21189
  111. package/dist-lib/vite.cjs +790 -157
  112. package/dist-lib/worklet-executable.cjs +2 -2
  113. package/dist-lib/worklet-executable.mjs +1 -1
  114. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +2 -0
  115. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -1
  116. package/dist-types/packages/peach-engine/src/capture/lockstep-clockContract.d.ts +1 -0
  117. package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +4 -0
  118. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +2 -2
  119. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -0
  121. package/dist-types/packages/peach-engine/src/engine/lottie-types.d.ts +3 -0
  122. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -3
  123. package/dist-types/packages/peach-engine/src/engine/riveContract.d.ts +5 -0
  124. package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
  125. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
  126. package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
  127. package/dist-types/packages/peach-engine/src/guest-module-overrides.d.ts +3 -0
  128. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +2 -1
  129. package/dist-types/packages/peach-engine/src/permissions/system-permission-types.d.ts +2 -1
  130. package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +1 -0
  131. package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
  132. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +6 -2
  133. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +4 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +16 -0
  135. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +18 -2
  136. package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +11 -0
  137. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +10 -1
  138. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -0
  139. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
  140. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +5 -0
  141. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +5 -0
  142. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +5 -0
  143. package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
  144. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +5 -1
  145. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +9 -4
  146. package/dist-types/packages/peach-engine/src/render-worker/workletThreadIdentityContract.d.ts +4 -0
  147. package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
  148. package/dist-types/packages/peach-globals/src/guestExecutionContract.d.ts +30 -0
  149. package/dist-types/packages/peach-globals/src/index.d.ts +6 -4
  150. package/dist-types/packages/peach-globals/src/nativeBuildOptionsContract.d.ts +1 -0
  151. package/dist-types/packages/peach-globals/src/permissionsBridgeContract.d.ts +11 -0
  152. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +22 -1
  153. package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
  154. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +10 -0
  155. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +9 -0
  156. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +3 -0
  157. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  158. package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
  159. package/package.json +3 -1
  160. package/runtime-companion.json +1 -1
  161. package/scripts/dev-server-scanner.ts +61 -70
  162. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
  163. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
  164. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
  165. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
  166. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
  167. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
  168. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
  169. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
  170. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
  171. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
  172. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
  173. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
  174. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
  175. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
  176. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
  177. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
  178. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
  179. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
  180. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
  181. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
  182. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
  183. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
  184. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
  185. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
  186. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
  187. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
  188. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
  189. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
  190. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
  191. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
  192. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
  193. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
  194. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
  195. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
  196. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
  197. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
  198. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
  199. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
  200. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
  201. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
  202. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
  203. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
  204. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
  205. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
  206. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
  207. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
  208. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
  209. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
  210. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
  211. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
  212. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
  213. package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
  214. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBATTRequest.h +69 -0
  215. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAdvertisementData.h +94 -0
  216. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +34 -0
  217. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentral.h +41 -0
  218. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +394 -0
  219. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManagerConstants.h +224 -0
  220. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +187 -0
  221. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDefines.h +16 -0
  222. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +78 -0
  223. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBError.h +75 -0
  224. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBL2CAPChannel.h +50 -0
  225. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +88 -0
  226. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +28 -0
  227. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +530 -0
  228. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManager.h +489 -0
  229. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManagerConstants.h +63 -0
  230. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +100 -0
  231. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +144 -0
  232. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes +7 -0
  233. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.h +32 -0
  234. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Modules/module.modulemap +5 -0
  235. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
  236. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
  237. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
  238. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCGTypes.h +131 -0
  239. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
  240. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
  241. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
  242. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
  243. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
  244. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
  245. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
  246. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
  247. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
  248. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
  249. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
  250. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
  251. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +13 -223
  252. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h +359 -2
  253. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h +328 -0
  254. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -66
  255. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.apinotes +258 -0
  256. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.h +31 -0
  257. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCError.h +103 -0
  258. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCFeliCaTag.h +267 -0
  259. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693ReaderSession.h +59 -0
  260. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693Tag.h +739 -0
  261. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO7816Tag.h +159 -0
  262. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCMiFareTag.h +94 -0
  263. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +60 -0
  264. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +121 -0
  265. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +169 -0
  266. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFTag.h +93 -0
  267. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCPaymentTagReaderSession.h +58 -0
  268. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +156 -0
  269. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTag.h +127 -0
  270. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTagReaderSession.h +201 -0
  271. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCVASReaderSession.h +237 -0
  272. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NSUserActivity+CoreNFC.h +35 -0
  273. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Modules/module.modulemap +21 -0
  274. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +53 -0
  275. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +45 -0
  276. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +87 -0
  277. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +39 -0
  278. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProperties.h +46 -0
  279. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioning.h +33 -0
  280. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioningRequest.h +36 -0
  281. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanStatus.h +57 -0
  282. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTQuickSwitch.h +53 -0
  283. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +107 -0
  284. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +34 -0
  285. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +161 -0
  286. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CoreTelephonyDefines.h +39 -0
  287. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Modules/module.modulemap +5 -0
  288. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h +92 -0
  289. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h +634 -0
  290. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h +118 -0
  291. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +1 -0
  292. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +2497 -0
  293. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2900 -370
  294. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAccessPoint.h +110 -0
  295. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +64 -0
  296. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementDescription.h +88 -0
  297. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementViewController.h +30 -0
  298. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +15 -0
  299. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +199 -0
  300. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeDefinition.h +71 -0
  301. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeEventHandler.h +43 -0
  302. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengesViewController.h +33 -0
  303. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKCloudPlayer.h +19 -0
  304. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDefines.h +17 -0
  305. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDialogController.h +35 -0
  306. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKError.h +52 -0
  307. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKEventListener.h +36 -0
  308. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKFriendRequestComposeViewController.h +60 -0
  309. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivity.h +201 -0
  310. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityDefinition.h +98 -0
  311. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityListener.h +28 -0
  312. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityPlayStyle.h +17 -0
  313. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityState.h +22 -0
  314. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +102 -0
  315. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSession.h +87 -0
  316. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionError.h +26 -0
  317. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionEventListener.h +25 -0
  318. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionSharingViewController.h +33 -0
  319. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboard.h +205 -0
  320. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardEntry.h +23 -0
  321. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardScore.h +25 -0
  322. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardSet.h +64 -0
  323. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardViewController.h +34 -0
  324. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +321 -0
  325. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatch.h +94 -0
  326. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +229 -0
  327. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmakerViewController.h +100 -0
  328. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +20 -0
  329. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPeerPickerController.h +93 -0
  330. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +82 -0
  331. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicConstants.h +57 -0
  332. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicProtocols.h +71 -0
  333. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKReleaseState.h +16 -0
  334. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +41 -0
  335. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGameListener.h +22 -0
  336. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKScore.h +73 -0
  337. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSession.h +87 -0
  338. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSessionError.h +30 -0
  339. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +314 -0
  340. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +69 -0
  341. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChat.h +48 -0
  342. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChatService.h +145 -0
  343. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.apinotes +307 -0
  344. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.h +79 -0
  345. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Modules/module.modulemap +6 -0
  346. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +122 -0
  347. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +48 -0
  348. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h +93 -0
  349. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleSleepingBreathingDisturbancesClassification.h +39 -0
  350. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleWalkingSteadinessClassification.h +49 -0
  351. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachment.h +74 -0
  352. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachmentStore.h +95 -0
  353. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSample.h +66 -0
  354. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPoint.h +82 -0
  355. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPointClampingRange.h +54 -0
  356. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityTest.h +101 -0
  357. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h +131 -0
  358. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +92 -0
  359. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategoryValues.h +279 -0
  360. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h +79 -0
  361. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicValues.h +87 -0
  362. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalCoding.h +55 -0
  363. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalRecord.h +53 -0
  364. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +68 -0
  365. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsLensSpecification.h +59 -0
  366. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsPrescription.h +74 -0
  367. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h +85 -0
  368. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h +57 -0
  369. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySample.h +36 -0
  370. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySeriesSample.h +23 -0
  371. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h +114 -0
  372. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h +40 -0
  373. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h +164 -0
  374. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDiscreteQuantitySample.h +67 -0
  375. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h +83 -0
  376. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h +29 -0
  377. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogram.h +109 -0
  378. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogramQuery.h +68 -0
  379. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRRelease.h +35 -0
  380. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRResource.h +81 -0
  381. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRVersion.h +50 -0
  382. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGAD7Assessment.h +73 -0
  383. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesLensSpecification.h +81 -0
  384. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesPrescription.h +66 -0
  385. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthConceptIdentifier.h +46 -0
  386. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +470 -0
  387. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesBuilder.h +104 -0
  388. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesQuery.h +47 -0
  389. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesSample.h +26 -0
  390. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLensSpecification.h +53 -0
  391. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutBuilder.h +131 -0
  392. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutDataSource.h +67 -0
  393. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutZoneUpdate.h +25 -0
  394. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationConcept.h +95 -0
  395. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationDoseEvent.h +113 -0
  396. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h +583 -0
  397. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadataEnums.h +250 -0
  398. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +64 -0
  399. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +294 -0
  400. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +48 -0
  401. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKPHQ9Assessment.h +77 -0
  402. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +55 -0
  403. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h +30 -0
  404. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +83 -0
  405. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleBuilder.h +184 -0
  406. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleQuery.h +90 -0
  407. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +722 -0
  408. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryAnchor.h +33 -0
  409. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryDescriptor.h +46 -0
  410. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +48 -0
  411. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +95 -0
  412. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKScoredAssessment.h +31 -0
  413. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h +40 -0
  414. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h +32 -0
  415. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h +45 -0
  416. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h +42 -0
  417. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h +78 -0
  418. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStateOfMind.h +157 -0
  419. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +166 -0
  420. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h +80 -0
  421. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +37 -0
  422. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h +359 -0
  423. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +287 -0
  424. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedication.h +60 -0
  425. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedicationQuery.h +38 -0
  426. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecord.h +131 -0
  427. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordQuery.h +76 -0
  428. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordSubject.h +39 -0
  429. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrescription.h +76 -0
  430. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrism.h +123 -0
  431. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h +341 -0
  432. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivity.h +127 -0
  433. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivityType.h +147 -0
  434. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutBuilder.h +264 -0
  435. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutConfiguration.h +62 -0
  436. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutEffortRelationshipQuery.h +80 -0
  437. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h +20 -0
  438. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h +102 -0
  439. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h +67 -0
  440. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h +364 -0
  441. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes +5 -0
  442. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h +101 -0
  443. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Modules/module.modulemap +5 -0
  444. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAAudibleMedia.h +41 -0
  445. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MACaptionAppearance.h +406 -0
  446. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MADefinitions.h +38 -0
  447. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAFlashingLightsProcessing.h +53 -0
  448. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAImageCaptioning.h +55 -0
  449. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAMusicHaptics.h +69 -0
  450. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAVideoAccommodations.h +34 -0
  451. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MediaAccessibility.h +14 -0
  452. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Modules/module.modulemap +11 -0
  453. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyFlow.h +142 -0
  454. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProvider.h +93 -0
  455. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProviderManager.h +40 -0
  456. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyTCPFlow.h +63 -0
  457. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyUDPFlow.h +86 -0
  458. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h +208 -0
  459. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h +87 -0
  460. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppRule.h +80 -0
  461. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyManager.h +109 -0
  462. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProvider.h +98 -0
  463. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProviderProtocol.h +45 -0
  464. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettings.h +124 -0
  465. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettingsManager.h +116 -0
  466. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelNetworkSettings.h +45 -0
  467. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelProvider.h +31 -0
  468. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterControlProvider.h +80 -0
  469. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterDataProvider.h +235 -0
  470. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h +177 -0
  471. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterManager.h +138 -0
  472. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterPacketProvider.h +99 -0
  473. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProvider.h +335 -0
  474. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProviderConfiguration.h +94 -0
  475. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterRule.h +46 -0
  476. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterSettings.h +56 -0
  477. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFlowMetaData.h +45 -0
  478. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotConfigurationManager.h +493 -0
  479. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +529 -0
  480. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +87 -0
  481. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv4Settings.h +122 -0
  482. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv6Settings.h +121 -0
  483. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NENetworkRule.h +218 -0
  484. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEOnDemandRule.h +210 -0
  485. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacket.h +67 -0
  486. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelFlow.h +62 -0
  487. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelNetworkSettings.h +135 -0
  488. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelProvider.h +97 -0
  489. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProvider.h +160 -0
  490. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProxySettings.h +140 -0
  491. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelay.h +83 -0
  492. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelayManager.h +195 -0
  493. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyManager.h +39 -0
  494. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyNetworkSettings.h +62 -0
  495. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyProvider.h +33 -0
  496. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelNetworkSettings.h +57 -0
  497. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProvider.h +113 -0
  498. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderManager.h +108 -0
  499. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderProtocol.h +44 -0
  500. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderSession.h +55 -0
  501. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEURLFilter.h +51 -0
  502. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNConnection.h +162 -0
  503. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNManager.h +153 -0
  504. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocol.h +135 -0
  505. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIKEv2.h +357 -0
  506. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIPSec.h +71 -0
  507. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWBonjourServiceEndpoint.h +82 -0
  508. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWEndpoint.h +40 -0
  509. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWHostEndpoint.h +68 -0
  510. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWPath.h +93 -0
  511. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTCPConnection.h +335 -0
  512. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTLSParameters.h +70 -0
  513. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWUDPSession.h +207 -0
  514. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.apinotes +351 -0
  515. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.h +74 -0
  516. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Modules/module.modulemap +5 -0
  517. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
  518. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +84 -0
  519. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +197 -0
  520. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +428 -0
  521. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +170 -0
  522. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h +50 -0
  523. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h +58 -0
  524. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +356 -0
  525. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +124 -0
  526. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +431 -0
  527. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +591 -0
  528. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +101 -0
  529. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h +58 -0
  530. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +56 -0
  531. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +350 -0
  532. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +349 -0
  533. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +149 -0
  534. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h +79 -0
  535. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +695 -0
  536. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +727 -0
  537. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +462 -0
  538. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +219 -0
  539. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h +148 -0
  540. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h +34 -0
  541. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h +124 -0
  542. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h +58 -0
  543. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h +90 -0
  544. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h +80 -0
  545. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +102 -0
  546. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +250 -0
  547. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h +389 -0
  548. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h +348 -0
  549. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +573 -0
  550. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h +84 -0
  551. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +320 -0
  552. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +64 -0
  553. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +170 -0
  554. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes +423 -0
  555. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h +58 -0
  556. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitAvailability.h +10 -0
  557. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +88 -0
  558. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h +264 -0
  559. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal +75 -0
  560. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Modules/module.modulemap +12 -0
  561. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/CipherSuite.h +281 -0
  562. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecAccessControl.h +133 -0
  563. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
  564. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
  565. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecIdentity.h +232 -0
  566. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
  567. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecKey.h +1616 -0
  568. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
  569. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolMetadata.h +429 -0
  570. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolObject.h +71 -0
  571. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolOptions.h +775 -0
  572. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h +327 -0
  573. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecRandom.h +84 -0
  574. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
  575. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +13 -0
  576. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +19 -0
  577. package/sdk/ios/usr/include/AvailabilityInternal.h +23 -0
  578. package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
  579. package/sdk/ios/usr/include/Block.h +56 -0
  580. package/sdk/ios/usr/include/CommonCrypto/CommonCrypto.h +34 -0
  581. package/sdk/ios/usr/include/CommonCrypto/CommonCryptoError.h +78 -0
  582. package/sdk/ios/usr/include/CommonCrypto/CommonCryptor.h +763 -0
  583. package/sdk/ios/usr/include/CommonCrypto/CommonDigest.h +254 -47
  584. package/sdk/ios/usr/include/CommonCrypto/CommonHMAC.h +162 -0
  585. package/sdk/ios/usr/include/CommonCrypto/CommonKeyDerivation.h +136 -0
  586. package/sdk/ios/usr/include/CommonCrypto/CommonRandom.h +63 -0
  587. package/sdk/ios/usr/include/CommonCrypto/CommonSymmetricKeywrap.h +162 -0
  588. package/sdk/ios/usr/include/CommonCrypto/module.modulemap +15 -0
  589. package/sdk/ios/usr/include/ObjectiveC.apinotes +437 -0
  590. package/sdk/ios/usr/include/TargetConditionals.h +525 -14
  591. package/sdk/ios/usr/include/___wctype.h +193 -0
  592. package/sdk/ios/usr/include/__wctype.h +43 -0
  593. package/sdk/ios/usr/include/_abort.h +36 -0
  594. package/sdk/ios/usr/include/_assert.h +80 -0
  595. package/sdk/ios/usr/include/_static_assert.h +33 -0
  596. package/sdk/ios/usr/include/_stdlib.h +403 -0
  597. package/sdk/ios/usr/include/_string.h +231 -0
  598. package/sdk/ios/usr/include/_strings.h +101 -0
  599. package/sdk/ios/usr/include/_types/_wctrans_t.h +33 -0
  600. package/sdk/ios/usr/include/_types/_wctype_t.h +33 -0
  601. package/sdk/ios/usr/include/_wchar.h +263 -0
  602. package/sdk/ios/usr/include/_wctype.h +129 -0
  603. package/sdk/ios/usr/include/_xlocale.h +47 -0
  604. package/sdk/ios/usr/include/alloca.h +46 -0
  605. package/sdk/ios/usr/include/architecture/byte_order.h +381 -0
  606. package/sdk/ios/usr/include/arm/_limits.h +13 -0
  607. package/sdk/ios/usr/include/arm/arch.h +71 -0
  608. package/sdk/ios/usr/include/arm/limits.h +136 -0
  609. package/sdk/ios/usr/include/arpa/inet.h +100 -0
  610. package/sdk/ios/usr/include/assert.h +77 -10
  611. package/sdk/ios/usr/include/bsm/audit.h +434 -0
  612. package/sdk/ios/usr/include/copyfile.h +143 -0
  613. package/sdk/ios/usr/include/crt_externs.h +50 -0
  614. package/sdk/ios/usr/include/dispatch/base.h +369 -0
  615. package/sdk/ios/usr/include/dispatch/block.h +509 -0
  616. package/sdk/ios/usr/include/dispatch/data.h +290 -0
  617. package/sdk/ios/usr/include/dispatch/dispatch.h +68 -172
  618. package/sdk/ios/usr/include/dispatch/dispatch_swift_shims.h +61 -0
  619. package/sdk/ios/usr/include/dispatch/group.h +289 -0
  620. package/sdk/ios/usr/include/dispatch/introspection.h +190 -0
  621. package/sdk/ios/usr/include/dispatch/io.h +617 -0
  622. package/sdk/ios/usr/include/dispatch/object.h +680 -0
  623. package/sdk/ios/usr/include/dispatch/once.h +128 -0
  624. package/sdk/ios/usr/include/dispatch/queue.h +1824 -0
  625. package/sdk/ios/usr/include/dispatch/semaphore.h +124 -0
  626. package/sdk/ios/usr/include/dispatch/source.h +803 -0
  627. package/sdk/ios/usr/include/dispatch/time.h +144 -0
  628. package/sdk/ios/usr/include/dispatch/workloop.h +178 -0
  629. package/sdk/ios/usr/include/dlfcn.h +320 -7
  630. package/sdk/ios/usr/include/execinfo.h +100 -10
  631. package/sdk/ios/usr/include/ftw.h +63 -0
  632. package/sdk/ios/usr/include/gethostuuid.h +45 -0
  633. package/sdk/ios/usr/include/libkern/arm/OSByteOrder.h +195 -0
  634. package/sdk/ios/usr/include/limits.h +167 -4
  635. package/sdk/ios/usr/include/mach/arm/boolean.h +74 -0
  636. package/sdk/ios/usr/include/mach/arm/exception.h +86 -0
  637. package/sdk/ios/usr/include/mach/arm/kern_return.h +78 -0
  638. package/sdk/ios/usr/include/mach/arm/processor_info.h +76 -0
  639. package/sdk/ios/usr/include/mach/arm/rpc.h +39 -0
  640. package/sdk/ios/usr/include/mach/arm/thread_state.h +42 -0
  641. package/sdk/ios/usr/include/mach/arm/thread_status.h +302 -0
  642. package/sdk/ios/usr/include/mach/arm/vm_param.h +118 -0
  643. package/sdk/ios/usr/include/mach/arm/vm_types.h +162 -0
  644. package/sdk/ios/usr/include/mach/boolean.h +88 -4
  645. package/sdk/ios/usr/include/mach/clock.h +249 -0
  646. package/sdk/ios/usr/include/mach/clock_priv.h +203 -0
  647. package/sdk/ios/usr/include/mach/clock_types.h +127 -0
  648. package/sdk/ios/usr/include/mach/dyld_kernel.h +66 -0
  649. package/sdk/ios/usr/include/mach/error.h +117 -0
  650. package/sdk/ios/usr/include/mach/exc.h +285 -0
  651. package/sdk/ios/usr/include/mach/exception_types.h +204 -25
  652. package/sdk/ios/usr/include/mach/host_info.h +136 -51
  653. package/sdk/ios/usr/include/mach/host_notify.h +39 -0
  654. package/sdk/ios/usr/include/mach/host_priv.h +1167 -0
  655. package/sdk/ios/usr/include/mach/host_security.h +225 -0
  656. package/sdk/ios/usr/include/mach/host_special_ports.h +315 -0
  657. package/sdk/ios/usr/include/mach/kern_return.h +291 -2
  658. package/sdk/ios/usr/include/mach/kmod.h +180 -0
  659. package/sdk/ios/usr/include/mach/mach.h +237 -12
  660. package/sdk/ios/usr/include/mach/mach_error.h +93 -10
  661. package/sdk/ios/usr/include/mach/mach_host.h +1329 -5
  662. package/sdk/ios/usr/include/mach/mach_init.h +112 -13
  663. package/sdk/ios/usr/include/mach/mach_interface.h +52 -0
  664. package/sdk/ios/usr/include/mach/mach_port.h +1935 -4
  665. package/sdk/ios/usr/include/mach/mach_time.h +77 -14
  666. package/sdk/ios/usr/include/mach/mach_traps.h +311 -0
  667. package/sdk/ios/usr/include/mach/mach_types.h +297 -20
  668. package/sdk/ios/usr/include/mach/mach_voucher_types.h +259 -0
  669. package/sdk/ios/usr/include/mach/machine/boolean.h +40 -0
  670. package/sdk/ios/usr/include/mach/machine/exception.h +40 -0
  671. package/sdk/ios/usr/include/mach/machine/kern_return.h +40 -0
  672. package/sdk/ios/usr/include/mach/machine/processor_info.h +40 -0
  673. package/sdk/ios/usr/include/mach/machine/rpc.h +40 -0
  674. package/sdk/ios/usr/include/mach/machine/thread_state.h +44 -0
  675. package/sdk/ios/usr/include/mach/machine/thread_status.h +40 -0
  676. package/sdk/ios/usr/include/mach/machine/vm_param.h +40 -0
  677. package/sdk/ios/usr/include/mach/machine/vm_types.h +40 -0
  678. package/sdk/ios/usr/include/mach/machine.h +456 -142
  679. package/sdk/ios/usr/include/mach/memory_object_types.h +312 -0
  680. package/sdk/ios/usr/include/mach/message.h +972 -0
  681. package/sdk/ios/usr/include/mach/mig.h +180 -0
  682. package/sdk/ios/usr/include/mach/mig_errors.h +125 -0
  683. package/sdk/ios/usr/include/mach/mig_strncpy_zerofill_support.h +35 -0
  684. package/sdk/ios/usr/include/mach/ndr.h +207 -0
  685. package/sdk/ios/usr/include/mach/notify.h +141 -0
  686. package/sdk/ios/usr/include/mach/policy.h +235 -0
  687. package/sdk/ios/usr/include/mach/port.h +648 -0
  688. package/sdk/ios/usr/include/mach/processor.h +364 -0
  689. package/sdk/ios/usr/include/mach/processor_info.h +171 -0
  690. package/sdk/ios/usr/include/mach/processor_set.h +589 -0
  691. package/sdk/ios/usr/include/mach/rpc.h +135 -0
  692. package/sdk/ios/usr/include/mach/semaphore.h +78 -0
  693. package/sdk/ios/usr/include/mach/std_types.h +75 -0
  694. package/sdk/ios/usr/include/mach/sync_policy.h +47 -0
  695. package/sdk/ios/usr/include/mach/task.h +2887 -7
  696. package/sdk/ios/usr/include/mach/task_info.h +584 -19
  697. package/sdk/ios/usr/include/mach/task_inspect.h +57 -0
  698. package/sdk/ios/usr/include/mach/task_policy.h +182 -26
  699. package/sdk/ios/usr/include/mach/task_special_ports.h +135 -0
  700. package/sdk/ios/usr/include/mach/thread_act.h +1550 -5
  701. package/sdk/ios/usr/include/mach/thread_info.h +206 -28
  702. package/sdk/ios/usr/include/mach/thread_policy.h +268 -0
  703. package/sdk/ios/usr/include/mach/thread_special_ports.h +87 -0
  704. package/sdk/ios/usr/include/mach/thread_status.h +100 -0
  705. package/sdk/ios/usr/include/mach/thread_switch.h +77 -0
  706. package/sdk/ios/usr/include/mach/time_value.h +96 -4
  707. package/sdk/ios/usr/include/mach/vm_attributes.h +99 -0
  708. package/sdk/ios/usr/include/mach/vm_behavior.h +86 -0
  709. package/sdk/ios/usr/include/mach/vm_inherit.h +93 -0
  710. package/sdk/ios/usr/include/mach/vm_map.h +1558 -0
  711. package/sdk/ios/usr/include/mach/vm_page_size.h +68 -0
  712. package/sdk/ios/usr/include/mach/vm_prot.h +183 -7
  713. package/sdk/ios/usr/include/mach/vm_purgable.h +166 -0
  714. package/sdk/ios/usr/include/mach/vm_region.h +400 -36
  715. package/sdk/ios/usr/include/mach/vm_statistics.h +387 -96
  716. package/sdk/ios/usr/include/mach/vm_sync.h +84 -0
  717. package/sdk/ios/usr/include/mach/vm_types.h +194 -7
  718. package/sdk/ios/usr/include/mach-o/arch.h +154 -16
  719. package/sdk/ios/usr/include/mach-o/fat.h +89 -0
  720. package/sdk/ios/usr/include/mach-o/getsect.h +146 -12
  721. package/sdk/ios/usr/include/mach-o/loader.h +1679 -139
  722. package/sdk/ios/usr/include/mach_debug/hash_info.h +75 -0
  723. package/sdk/ios/usr/include/mach_debug/ipc_info.h +199 -0
  724. package/sdk/ios/usr/include/mach_debug/lockgroup_info.h +74 -0
  725. package/sdk/ios/usr/include/mach_debug/mach_debug_types.h +200 -0
  726. package/sdk/ios/usr/include/mach_debug/page_info.h +64 -0
  727. package/sdk/ios/usr/include/mach_debug/vm_info.h +149 -0
  728. package/sdk/ios/usr/include/mach_debug/zone_info.h +209 -0
  729. package/sdk/ios/usr/include/machine/limits.h +14 -0
  730. package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
  731. package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
  732. package/sdk/ios/usr/include/malloc/_platform.h +80 -0
  733. package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
  734. package/sdk/ios/usr/include/malloc/malloc.h +768 -0
  735. package/sdk/ios/usr/include/module.modulemap +4 -0
  736. package/sdk/ios/usr/include/net/if_types.h +152 -0
  737. package/sdk/ios/usr/include/objc/NSObjCRuntime.h +10 -0
  738. package/sdk/ios/usr/include/objc/NSObject.h +23 -25
  739. package/sdk/ios/usr/include/objc/objc-api.h +310 -0
  740. package/sdk/ios/usr/include/objc/objc.h +243 -0
  741. package/sdk/ios/usr/include/objc/runtime.h +1933 -0
  742. package/sdk/ios/usr/include/os/availability.h +168 -6
  743. package/sdk/ios/usr/include/os/base.h +351 -0
  744. package/sdk/ios/usr/include/os/clock.h +18 -0
  745. package/sdk/ios/usr/include/os/lock.h +232 -10
  746. package/sdk/ios/usr/include/os/log.h +521 -38
  747. package/sdk/ios/usr/include/os/object.h +320 -3
  748. package/sdk/ios/usr/include/os/trace.h +492 -0
  749. package/sdk/ios/usr/include/os/trace_base.h +167 -0
  750. package/sdk/ios/usr/include/os/workgroup.h +37 -0
  751. package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
  752. package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
  753. package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
  754. package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
  755. package/sdk/ios/usr/include/os.modulemap +6 -0
  756. package/sdk/ios/usr/include/pthread/pthread_impl.h +66 -0
  757. package/sdk/ios/usr/include/pthread/sched.h +46 -0
  758. package/sdk/ios/usr/include/pthread.h +754 -4
  759. package/sdk/ios/usr/include/pwd.h +119 -0
  760. package/sdk/ios/usr/include/sched.h +46 -0
  761. package/sdk/ios/usr/include/secure/_string.h +295 -0
  762. package/sdk/ios/usr/include/secure/_strings.h +96 -0
  763. package/sdk/ios/usr/include/spawn.h +193 -0
  764. package/sdk/ios/usr/include/stddef.h +90 -0
  765. package/sdk/ios/usr/include/stdlib.h +62 -17
  766. package/sdk/ios/usr/include/string.h +62 -8
  767. package/sdk/ios/usr/include/sys/_pthread/_pthread_cond_t.h +32 -0
  768. package/sdk/ios/usr/include/sys/_pthread/_pthread_condattr_t.h +32 -0
  769. package/sdk/ios/usr/include/sys/_pthread/_pthread_key_t.h +32 -0
  770. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutex_t.h +32 -0
  771. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutexattr_t.h +32 -0
  772. package/sdk/ios/usr/include/sys/_pthread/_pthread_once_t.h +32 -0
  773. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlock_t.h +32 -0
  774. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlockattr_t.h +32 -0
  775. package/sdk/ios/usr/include/sys/_select.h +57 -0
  776. package/sdk/ios/usr/include/sys/_types/_blkcnt_t.h +32 -0
  777. package/sdk/ios/usr/include/sys/_types/_blksize_t.h +32 -0
  778. package/sdk/ios/usr/include/sys/_types/_caddr_t.h +32 -0
  779. package/sdk/ios/usr/include/sys/_types/_dev_t.h +32 -0
  780. package/sdk/ios/usr/include/sys/_types/_fsblkcnt_t.h +32 -0
  781. package/sdk/ios/usr/include/sys/_types/_fsfilcnt_t.h +32 -0
  782. package/sdk/ios/usr/include/sys/_types/_fsid_t.h +32 -0
  783. package/sdk/ios/usr/include/sys/_types/_fsobj_id_t.h +38 -0
  784. package/sdk/ios/usr/include/sys/_types/_graftdmg_un.h +64 -0
  785. package/sdk/ios/usr/include/sys/_types/_guid_t.h +37 -0
  786. package/sdk/ios/usr/include/sys/_types/_id_t.h +32 -0
  787. package/sdk/ios/usr/include/sys/_types/_ino64_t.h +32 -0
  788. package/sdk/ios/usr/include/sys/_types/_key_t.h +32 -0
  789. package/sdk/ios/usr/include/sys/_types/_mach_port_t.h +51 -0
  790. package/sdk/ios/usr/include/sys/_types/_mbstate_t.h +33 -0
  791. package/sdk/ios/usr/include/sys/_types/_mount_t.h +34 -0
  792. package/sdk/ios/usr/include/sys/_types/_nlink_t.h +32 -0
  793. package/sdk/ios/usr/include/sys/_types/_os_inline.h +34 -0
  794. package/sdk/ios/usr/include/sys/_types/_posix_vdisable.h +30 -0
  795. package/sdk/ios/usr/include/sys/_types/_rsize_t.h +55 -0
  796. package/sdk/ios/usr/include/sys/_types/_suseconds_t.h +32 -0
  797. package/sdk/ios/usr/include/sys/_types/_timeval.h +39 -0
  798. package/sdk/ios/usr/include/sys/_types/_u_char.h +31 -0
  799. package/sdk/ios/usr/include/sys/_types/_u_int.h +31 -0
  800. package/sdk/ios/usr/include/sys/_types/_u_short.h +31 -0
  801. package/sdk/ios/usr/include/sys/_types/_useconds_t.h +32 -0
  802. package/sdk/ios/usr/include/sys/_types/_uuid_t.h +32 -0
  803. package/sdk/ios/usr/include/sys/_types/_vnode_t.h +34 -0
  804. package/sdk/ios/usr/include/sys/acl.h +215 -0
  805. package/sdk/ios/usr/include/sys/attr.h +635 -0
  806. package/sdk/ios/usr/include/sys/cdefs.h +53 -0
  807. package/sdk/ios/usr/include/sys/event.h +388 -0
  808. package/sdk/ios/usr/include/sys/kauth.h +409 -0
  809. package/sdk/ios/usr/include/sys/mount.h +470 -0
  810. package/sdk/ios/usr/include/sys/queue.h +909 -0
  811. package/sdk/ios/usr/include/sys/resource.h +600 -0
  812. package/sdk/ios/usr/include/sys/select.h +134 -0
  813. package/sdk/ios/usr/include/sys/spawn.h +84 -0
  814. package/sdk/ios/usr/include/sys/sysctl.h +803 -57
  815. package/sdk/ios/usr/include/sys/syslimits.h +131 -11
  816. package/sdk/ios/usr/include/sys/types.h +236 -19
  817. package/sdk/ios/usr/include/sys/ucred.h +116 -0
  818. package/sdk/ios/usr/include/sys/un.h +105 -0
  819. package/sdk/ios/usr/include/sys/unistd.h +225 -0
  820. package/sdk/ios/usr/include/sys/vm.h +89 -0
  821. package/sdk/ios/usr/include/sys/wait.h +256 -0
  822. package/sdk/ios/usr/include/sysdir.h +79 -0
  823. package/sdk/ios/usr/include/unistd.h +799 -3
  824. package/sdk/ios/usr/include/uuid/uuid.h +69 -10
  825. package/sdk/ios/usr/include/wchar.h +71 -0
  826. package/sdk/ios/usr/include/wctype.h +35 -0
  827. package/sdk/ios/usr/include/xlocale/___wctype.h +146 -0
  828. package/sdk/ios/usr/include/xlocale/_ctype.h +240 -0
  829. package/sdk/ios/usr/include/xlocale/_stdlib.h +77 -0
  830. package/sdk/ios/usr/include/xlocale/_string.h +43 -0
  831. package/sdk/ios/usr/include/xlocale/_wchar.h +160 -0
  832. package/sdk/ios/usr/include/xlocale/_wctype.h +100 -0
  833. package/sdk/ios/usr/include/xlocale.h +61 -0
  834. package/sdk/ios/usr/include/xpc/availability.h +141 -0
  835. package/sdk/ios/usr/include/xpc/base.h +243 -0
  836. package/sdk/ios/wasm/include/AvailabilityInternal.h +24 -0
  837. package/sdk/ios/wasm/include/TargetConditionals.h +529 -0
  838. package/sdk/ios/wasm/include/_locale.h +3 -0
  839. package/sdk/ios/wasm/include/_locale_posix2008.h +3 -0
  840. package/sdk/ios/wasm/include/_types/_locale_t.h +3 -0
  841. package/sdk/ios/wasm/include/arpa/inet.h +15 -0
  842. package/sdk/ios/wasm/include/dirent.h +52 -0
  843. package/sdk/ios/wasm/include/dlfcn.h +13 -1
  844. package/sdk/ios/wasm/include/errno.h +22 -0
  845. package/sdk/ios/wasm/include/fcntl.h +29 -0
  846. package/sdk/ios/wasm/include/ftw.h +15 -0
  847. package/sdk/ios/wasm/include/libkern/_OSByteOrder.h +6 -0
  848. package/sdk/ios/wasm/include/limits.h +9 -0
  849. package/sdk/ios/wasm/include/mach/machine/boolean.h +1 -1
  850. package/sdk/ios/wasm/include/mach/machine/exception.h +1 -4
  851. package/sdk/ios/wasm/include/mach/machine/kern_return.h +1 -1
  852. package/sdk/ios/wasm/include/mach/machine/processor_info.h +1 -1
  853. package/sdk/ios/wasm/include/mach/machine/rpc.h +1 -1
  854. package/sdk/ios/wasm/include/mach/machine/thread_state.h +1 -2
  855. package/sdk/ios/wasm/include/mach/machine/thread_status.h +1 -2
  856. package/sdk/ios/wasm/include/mach/machine/vm_param.h +1 -2
  857. package/sdk/ios/wasm/include/mach/machine/vm_types.h +1 -17
  858. package/sdk/ios/wasm/include/machine/_endian.h +2 -0
  859. package/sdk/ios/wasm/include/machine/_param.h +2 -0
  860. package/sdk/ios/wasm/include/machine/endian.h +1 -1
  861. package/sdk/ios/wasm/include/machine/limits.h +106 -2
  862. package/sdk/ios/wasm/include/machine/param.h +152 -0
  863. package/sdk/ios/wasm/include/netinet/in.h +11 -0
  864. package/sdk/ios/wasm/include/os/object.h +10 -0
  865. package/sdk/ios/wasm/include/pthread.h +14 -0
  866. package/sdk/ios/wasm/include/stdio.h +12 -0
  867. package/sdk/ios/wasm/include/stdlib.h +13 -0
  868. package/sdk/ios/wasm/include/strings.h +9 -0
  869. package/sdk/ios/wasm/include/sys/_types/_iovec_t.h +6 -0
  870. package/sdk/ios/wasm/include/sys/_types/_mode_t.h +10 -0
  871. package/sdk/ios/wasm/include/sys/mman.h +2 -2
  872. package/sdk/ios/wasm/include/sys/param.h +4 -0
  873. package/sdk/ios/wasm/include/sys/resource.h +43 -0
  874. package/sdk/ios/wasm/include/sys/socket.h +75 -9
  875. package/sdk/ios/wasm/include/sys/stat.h +63 -0
  876. package/sdk/ios/wasm/include/sys/types.h +13 -0
  877. package/sdk/ios/wasm/include/sys/un.h +7 -0
  878. package/sdk/ios/wasm/include/time.h +3 -1
  879. package/sdk/ios/wasm/include/unistd.h +19 -3
  880. package/sdk/ios/wasm/include/xlocale/_stdlib.h +37 -0
  881. package/sdk/ios/wasm/storage-include/TargetConditionals.h +529 -0
  882. package/sdk/ios/wasm/storage-include/mach/machine/boolean.h +2 -0
  883. package/sdk/ios/wasm/storage-include/mach/machine/exception.h +5 -0
  884. package/sdk/ios/wasm/storage-include/mach/machine/kern_return.h +2 -0
  885. package/sdk/ios/wasm/storage-include/mach/machine/processor_info.h +2 -0
  886. package/sdk/ios/wasm/storage-include/mach/machine/rpc.h +2 -0
  887. package/sdk/ios/wasm/storage-include/mach/machine/thread_state.h +3 -0
  888. package/sdk/ios/wasm/storage-include/mach/machine/thread_status.h +3 -0
  889. package/sdk/ios/wasm/storage-include/mach/machine/vm_param.h +3 -0
  890. package/sdk/ios/wasm/storage-include/mach/machine/vm_types.h +18 -0
  891. package/sdk/ios/wasm/storage-include/machine/_endian.h +9 -0
  892. package/sdk/ios/wasm/storage-include/machine/_param.h +8 -0
  893. package/sdk/ios/wasm/storage-include/machine/_types.h +31 -0
  894. package/sdk/ios/wasm/storage-include/machine/endian.h +2 -0
  895. package/sdk/ios/wasm/storage-include/machine/limits.h +2 -0
  896. package/sdk/ios/wasm/storage-include/machine/types.h +15 -0
  897. package/sdk/native-hashes.json +80 -0
  898. package/skills/contrast/SKILL.md +4 -1
  899. package/src/android-root-module.ts +145 -0
  900. package/src/androidRootModuleContract.ts +39 -0
  901. package/src/assetCatalogContract.ts +10 -1
  902. package/src/backend-origin.ts +11 -8
  903. package/src/bridge-constants.ts +7 -0
  904. package/src/bridge-contract.ts +3 -1
  905. package/src/capture-contract.ts +3 -1
  906. package/src/cli-runtime.ts +6 -1
  907. package/src/codex-client.ts +11 -6
  908. package/src/dev-bundle-resolution.ts +124 -48
  909. package/src/device-catalog.ts +10 -4
  910. package/src/expo-discovery-cache.ts +272 -0
  911. package/src/expo-native-workspace.ts +207 -0
  912. package/src/expo-swift-host.ts +824 -33
  913. package/src/expo-swift-ready.ts +56 -38
  914. package/src/expoSwiftContract.ts +4 -1
  915. package/src/generated/swift-c-predefines.json +69 -13
  916. package/src/host/bridge-host.ts +33 -0
  917. package/src/host/fetch-proxy-handler.ts +19 -1
  918. package/src/host/network-policy-proxy.ts +421 -0
  919. package/src/host/network-policy.ts +121 -0
  920. package/src/host/staged-host-files.ts +80 -3
  921. package/src/host/websocket-frame-guard.ts +163 -0
  922. package/src/host/websocket-proxy-headers.ts +29 -0
  923. package/src/host/websocket-proxy.ts +100 -58
  924. package/src/installed-native-build-options.ts +154 -0
  925. package/src/installed-package-versions.ts +70 -50
  926. package/src/material-symbol-fonts.ts +6 -4
  927. package/src/menu.ts +6 -0
  928. package/src/metro-plugin.ts +8 -0
  929. package/src/metro-project-root.ts +44 -33
  930. package/src/native-app-identity-project.ts +5 -0
  931. package/src/native-app-identity.ts +16 -0
  932. package/src/native-dev-bundle-url.ts +0 -18
  933. package/src/native-firebase-config.ts +47 -4
  934. package/src/native-preparation.ts +30 -0
  935. package/src/nativePreparationContract.ts +3 -0
  936. package/src/nitro-adapter.lock.json +1072 -14
  937. package/src/nitro-adapter.ts +33 -24
  938. package/src/nitro-bundle.ts +132 -22
  939. package/src/nitro-compile.ts +47 -7
  940. package/src/nitro-dependencies.ts +226 -0
  941. package/src/nitro-source.ts +200 -40
  942. package/src/nitroAdapterContract.ts +100 -20
  943. package/src/node-http-fetch.ts +116 -0
  944. package/src/packageVersionsContract.ts +79 -0
  945. package/src/react-native-bridge-modules.ts +24 -1
  946. package/src/react-native-host-modules.ts +111 -4
  947. package/src/runtime-assets.ts +10 -0
  948. package/src/serverDiscoveryContract.ts +1 -0
  949. package/src/settingsContract.ts +0 -30
  950. package/src/sim-client.ts +1 -1
  951. package/src/storageSnapshotContract.ts +22 -10
  952. package/src/stub-pattern-matcher.ts +17 -4
  953. package/src/swift-binary-modules.ts +20 -5
  954. package/src/swift-compile.ts +1292 -4123
  955. package/src/swift-compiler-digest.ts +1 -2
  956. package/src/swift-coverage/package.ts +103 -58
  957. package/src/swift-coverage/xcode-assets.ts +26 -5
  958. package/src/swift-coverage/xcode-bridging.ts +1 -12
  959. package/src/swift-coverage/xcode-packages.ts +167 -52
  960. package/src/swift-coverage/xcode.ts +2 -6
  961. package/src/swift-cxx-declarations.ts +205 -0
  962. package/src/swift-cxx-deps.ts +48 -0
  963. package/src/swift-cxx-reachable.ts +297 -0
  964. package/src/swift-cxx-standin.ts +248 -0
  965. package/src/swift-distribution.lock.json +29 -20
  966. package/src/swift-host.ts +229 -24
  967. package/src/swift-objc-compile.ts +638 -219
  968. package/src/swift-objc-import.ts +19 -964
  969. package/src/swift-objc-platform.ts +2 -2
  970. package/src/swift-objc-runtime.ts +7 -0
  971. package/src/swift-objc-standin.ts +314 -64
  972. package/src/swift-package-manifest.ts +179 -38
  973. package/src/swift-package.ts +156 -29
  974. package/src/swift-packages.ts +193 -34
  975. package/src/swift-pdf-raster.ts +114 -0
  976. package/src/swift-shared-sdk.ts +45 -0
  977. package/src/swift-source-file.ts +10 -6
  978. package/src/swift-source-pods.ts +126 -41
  979. package/src/swift-standin-digest.ts +74 -0
  980. package/src/swift-standin-emit.ts +48 -4
  981. package/src/swift-standins.ts +334 -92
  982. package/src/swift-submit.ts +24 -6
  983. package/src/swift-toolchain.ts +49 -9
  984. package/src/swiftContract.ts +58 -29
  985. package/src/vite-plugin.ts +0 -23
  986. package/src/workspace-root.ts +15 -0
  987. package/src/xcode-json-project.ts +52 -1
  988. package/src/xcode-project.ts +355 -65
  989. package/src/settings-flags.ts +0 -107
  990. package/src/swift-objc-export.ts +0 -532
  991. package/src/swift-objc-metadata.ts +0 -534
@@ -14,11 +14,12 @@
14
14
  #include <uuid/uuid.h>
15
15
  #include <TargetConditionals.h>
16
16
  #import <objc/NSObject.h>
17
+ #include <objc/encoding.h>
17
18
  #import <dispatch/dispatch.h>
18
19
  #import <CoreFoundation/CoreFoundation.h>
19
20
  @class NSCharacterSet;
20
21
  @class NSURLSessionConfiguration, NSOperation, NSURLCache, NSCachedURLResponse, NSBlockOperation, NSCache;
21
- #import <CoreGraphics/CoreGraphics.h>
22
+ #import <Security/Security.h>
22
23
 
23
24
  @class NSPropertyListSerialization;
24
25
  @class NSKeyedUnarchiver;
@@ -63,9 +64,6 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
63
64
  #endif
64
65
  #define FOUNDATION_EXPORT extern
65
66
  #define FOUNDATION_EXTERN extern
66
- #define __nullable _Nullable
67
- #define __nonnull _Nonnull
68
- #define __null_unspecified _Null_unspecified
69
67
  #define FOUNDATION_STATIC_INLINE static inline
70
68
  #define NS_INLINE static inline
71
69
  #define CF_EXPORT extern
@@ -93,35 +91,27 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
93
91
  #endif
94
92
 
95
93
  /* NS_ERROR_ENUM supports the use of one or two arguments. The first argument is always the domain specifier for the enum. The second argument is an optional name of the typedef for the macro. When specifying a name for of the typedef, you must precede the macro with 'typedef' like so:
96
-
94
+
97
95
  typedef NS_ERROR_ENUM(MyErrorDomain, SomeErrorCodes) {
98
96
  ...
99
97
  };
100
-
98
+
101
99
  If you do not specify a typedef name, do not use 'typedef', like so:
102
-
100
+
103
101
  NS_ERROR_ENUM(MyErrorDomain) {
104
102
  ...
105
103
  };
106
104
  */
107
105
  #define NS_ERROR_ENUM(...) __NS_ERROR_ENUM_GET_MACRO(__VA_ARGS__, __NS_NAMED_ERROR_ENUM, __NS_ANON_ERROR_ENUM)(__VA_ARGS__)
108
- #define NS_ENUM_AVAILABLE(...)
109
- #define NS_ENUM_AVAILABLE_IOS(...)
110
- #define NS_ENUM_DEPRECATED_IOS(...)
111
- #define NS_ENUM_DEPRECATED(...)
112
106
  #define _NS_TYPED_ENUM __attribute__((swift_wrapper(enum)))
113
107
  #define _NS_TYPED_EXTENSIBLE_ENUM __attribute__((swift_wrapper(struct)))
114
108
  #define NS_TYPED_ENUM _NS_TYPED_ENUM
115
109
  #define NS_TYPED_EXTENSIBLE_ENUM _NS_TYPED_EXTENSIBLE_ENUM
116
110
  #define NS_STRING_ENUM _NS_TYPED_ENUM
117
111
  #define NS_EXTENSIBLE_STRING_ENUM _NS_TYPED_EXTENSIBLE_ENUM
118
- #define CF_TYPED_ENUM _NS_TYPED_ENUM
119
- #define CF_TYPED_EXTENSIBLE_ENUM _NS_TYPED_EXTENSIBLE_ENUM
120
- #define CF_STRING_ENUM _NS_TYPED_ENUM
121
112
  #define NS_SWIFT_NAME(_name) __attribute__((swift_name(#_name)))
122
113
  #define CF_SWIFT_NAME(_name) __attribute__((swift_name(#_name)))
123
114
  #define NS_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
124
- #define CF_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
125
115
  #define NS_REFINED_FOR_SWIFT __attribute__((swift_private))
126
116
  #define CF_REFINED_FOR_SWIFT __attribute__((swift_private))
127
117
  #define NS_SWIFT_NOTHROW __attribute__((swift_error(none)))
@@ -139,13 +129,9 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
139
129
  #define NS_SWIFT_NONSENDABLE __attribute__((swift_attr("@_nonSendable")))
140
130
  #define NS_SWIFT_UNAVAILABLE_FROM_ASYNC(_msg)
141
131
  #define NS_SWIFT_BRIDGED_TYPEDEF __attribute__((swift_bridged_typedef))
142
- #define CF_SWIFT_BRIDGED_TYPEDEF __attribute__((swift_bridged_typedef))
143
132
  #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
144
133
  #define NS_UNAVAILABLE __attribute__((unavailable))
145
- #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
146
134
  #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE
147
- #define DEPRECATED_ATTRIBUTE __attribute__((deprecated))
148
- #define DEPRECATED_MSG_ATTRIBUTE(_msg) __attribute__((deprecated(_msg)))
149
135
  #define NS_REQUIRES_SUPER __attribute__((objc_requires_super))
150
136
  #define NS_REQUIRES_NIL_TERMINATION __attribute__((sentinel(0, 1)))
151
137
  #define NS_NOESCAPE __attribute__((noescape))
@@ -162,36 +148,54 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
162
148
  #define OBJC_ROOT_CLASS __attribute__((objc_root_class))
163
149
  #define NS_REQUIRES_PROPERTY_DEFINITIONS
164
150
  #define NS_SWIFT_SENDABLE_CLASS
165
- #define NS_CLASS_AVAILABLE(...)
166
- #define NS_CLASS_AVAILABLE_IOS(...)
167
- #define NS_CLASS_DEPRECATED_IOS(...)
168
- #define NS_AVAILABLE(_mac, _ios) __attribute__((availability(ios,introduced=_ios)))
169
- #define NS_AVAILABLE_IOS(...)
170
- #define NS_AVAILABLE_MAC(...)
171
- #define NS_DEPRECATED(...)
172
- #define NS_DEPRECATED_IOS(...)
173
- #define NS_DEPRECATED_MAC(...)
174
- #define NS_EXTENSION_UNAVAILABLE(...)
175
- #define NS_EXTENSION_UNAVAILABLE_IOS(...)
176
151
  #include <os/availability.h>
177
- #define __API_AVAILABLE(...)
178
- #define __API_UNAVAILABLE(...)
179
- #define __API_DEPRECATED(...)
180
- #define __OSX_AVAILABLE(...)
181
- #define __IOS_AVAILABLE(...)
182
- #define __TVOS_AVAILABLE(...)
183
- #define __WATCHOS_AVAILABLE(...)
184
- #define __IOS_PROHIBITED
185
- #define __TVOS_PROHIBITED
186
- #define __WATCHOS_PROHIBITED
187
- #define __OSX_AVAILABLE_STARTING(...)
188
- #define __OSX_AVAILABLE_BUT_DEPRECATED(...)
189
- #define __OSX_AVAILABLE_BUT_DEPRECATED_MSG(...)
152
+ #define NS_AVAILABLE(_mac, _ios) CF_AVAILABLE(_mac, _ios)
153
+ #define NS_AVAILABLE_MAC(_mac) CF_AVAILABLE_MAC(_mac)
154
+ #define NS_AVAILABLE_IOS(_ios) CF_AVAILABLE_IOS(_ios)
155
+
156
+ #define NS_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) CF_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, __VA_ARGS__)
157
+ #define NS_DEPRECATED_MAC(_macIntro, _macDep, ...) CF_DEPRECATED_MAC(_macIntro, _macDep, __VA_ARGS__)
158
+ #define NS_DEPRECATED_IOS(_iosIntro, _iosDep, ...) CF_DEPRECATED_IOS(_iosIntro, _iosDep, __VA_ARGS__)
159
+
160
+ #define NS_DEPRECATED_WITH_REPLACEMENT_MAC(_rep, _macIntroduced, _macDeprecated) API_DEPRECATED_WITH_REPLACEMENT(_rep, macosx(_macIntroduced, _macDeprecated)) API_UNAVAILABLE(ios, watchos, tvos)
161
+
162
+ #define NS_ENUM_AVAILABLE(_mac, _ios) CF_ENUM_AVAILABLE(_mac, _ios)
163
+ #define NS_ENUM_AVAILABLE_MAC(_mac) CF_ENUM_AVAILABLE_MAC(_mac)
164
+ #define NS_ENUM_AVAILABLE_IOS(_ios) CF_ENUM_AVAILABLE_IOS(_ios)
165
+
166
+ #define NS_ENUM_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, ...) CF_ENUM_DEPRECATED(_macIntro, _macDep, _iosIntro, _iosDep, __VA_ARGS__)
167
+ #define NS_ENUM_DEPRECATED_MAC(_macIntro, _macDep, ...) CF_ENUM_DEPRECATED_MAC(_macIntro, _macDep, __VA_ARGS__)
168
+ #define NS_ENUM_DEPRECATED_IOS(_iosIntro, _iosDep, ...) CF_ENUM_DEPRECATED_IOS(_iosIntro, _iosDep, __VA_ARGS__)
169
+
170
+ #define NS_AVAILABLE_IPHONE(_ios) CF_AVAILABLE_IOS(_ios)
171
+ #define NS_DEPRECATED_IPHONE(_iosIntro, _iosDep) CF_DEPRECATED_IOS(_iosIntro, _iosDep)
172
+
173
+ #if (__MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_6 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_3_1) && \
174
+ ((__has_feature(objc_weak_class) || \
175
+ (defined(__llvm__) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5658)) || \
176
+ (defined(__APPLE_CC__) && (__APPLE_CC__ >= 5666))))
177
+ #define NS_CLASS_AVAILABLE(_mac, _ios) __attribute__((visibility("default"))) NS_AVAILABLE(_mac, _ios)
178
+ #define NS_CLASS_DEPRECATED(_mac, _macDep, _ios, _iosDep, ...) __attribute__((visibility("default"))) NS_DEPRECATED(_mac, _macDep, _ios, _iosDep, __VA_ARGS__)
179
+ #else
180
+ // class weak import is not supported
181
+ #define NS_CLASS_AVAILABLE(_mac, _ios)
182
+ #define NS_CLASS_DEPRECATED(_mac, _macDep, _ios, _iosDep, ...)
183
+ #endif
184
+
185
+ #define NS_CLASS_AVAILABLE_IOS(_ios) NS_CLASS_AVAILABLE(NA, _ios)
186
+ #define NS_CLASS_AVAILABLE_MAC(_mac) NS_CLASS_AVAILABLE(_mac, NA)
187
+ #define NS_CLASS_DEPRECATED_MAC(_macIntro, _macDep, ...) NS_CLASS_DEPRECATED(_macIntro, _macDep, NA, NA, __VA_ARGS__)
188
+ #define NS_CLASS_DEPRECATED_IOS(_iosIntro, _iosDep, ...) NS_CLASS_DEPRECATED(NA, NA, _iosIntro, _iosDep, __VA_ARGS__)
189
+
190
+ #define NS_EXTENSION_UNAVAILABLE(_msg) __OS_EXTENSION_UNAVAILABLE(_msg)
191
+ #define NS_EXTENSION_UNAVAILABLE_MAC(_msg) __OSX_EXTENSION_UNAVAILABLE(_msg)
192
+ #define NS_EXTENSION_UNAVAILABLE_IOS(_msg) __IOS_EXTENSION_UNAVAILABLE(_msg)
193
+
194
+
195
+
196
+
190
197
  #define OBJC_AVAILABLE(...)
191
198
  #define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
192
- #define CF_AVAILABLE(...)
193
- #define CF_AVAILABLE_IOS(...)
194
- #define CF_DEPRECATED(...)
195
199
  #define CF_BRIDGED_TYPE(_t) __attribute__((objc_bridge(_t)))
196
200
  #define CF_BRIDGED_MUTABLE_TYPE(_t) __attribute__((objc_bridge_mutable(_t)))
197
201
  #define CF_RELATED_TYPE(...)
@@ -206,17 +210,10 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
206
210
 
207
211
  NS_ASSUME_NONNULL_BEGIN
208
212
 
213
+ typedef struct _NSZone NSZone;
209
214
  typedef double NSTimeInterval NS_SWIFT_NAME(TimeInterval);
210
215
  #define NSTimeIntervalSince1970 978307200.0
211
216
  typedef uint16_t unichar;
212
- typedef NSUInteger NSStringEncoding;
213
- NS_ENUM(NSStringEncoding) {
214
- NSASCIIStringEncoding = 1,
215
- NSUTF8StringEncoding = 4,
216
- NSUnicodeStringEncoding = 10,
217
- NSUTF16StringEncoding = NSUnicodeStringEncoding,
218
- NSUTF16BigEndianStringEncoding = 0x90000100
219
- };
220
217
  typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange;
221
218
  typedef NSRange *NSRangePointer;
222
219
  NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
@@ -225,32 +222,21 @@ NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
225
222
  r.length = len;
226
223
  return r;
227
224
  }
228
- typedef NS_CLOSED_ENUM(NSInteger, NSComparisonResult) { NSOrderedAscending = -1L, NSOrderedSame, NSOrderedDescending } NS_SWIFT_NAME(ComparisonResult);
225
+ typedef NS_CLOSED_ENUM(NSInteger, NSComparisonResult) {
226
+ /// The left operand is smaller than the right operand.
227
+ NSOrderedAscending = -1L,
228
+ /// The two operands are equal.
229
+ NSOrderedSame,
230
+ /// The left operand is greater than the right operand.
231
+ NSOrderedDescending
232
+ };
229
233
  typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
230
234
  typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1) };
231
- typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
232
- NSCaseInsensitiveSearch = 1,
233
- NSLiteralSearch = 2,
234
- NSBackwardsSearch = 4,
235
- NSAnchoredSearch = 8,
236
- NSNumericSearch = 64,
237
- NSDiacriticInsensitiveSearch __attribute__((availability(ios,introduced=2.0))) = 128,
238
- NSWidthInsensitiveSearch __attribute__((availability(ios,introduced=2.0))) = 256,
239
- NSForcedOrderingSearch __attribute__((availability(ios,introduced=2.0))) = 512,
240
- NSRegularExpressionSearch __attribute__((availability(ios,introduced=3.2))) = 1024
241
- };
242
235
  typedef NS_OPTIONS(NSUInteger, NSSortOptions) { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4) };
243
236
  typedef NS_ENUM(NSInteger, NSQualityOfService) { NSQualityOfServiceUserInteractive = 0x21, NSQualityOfServiceUserInitiated = 0x19, NSQualityOfServiceUtility = 0x11, NSQualityOfServiceBackground = 0x09, NSQualityOfServiceDefault = -1 } NS_SWIFT_NAME(QualityOfService);
244
237
 
245
- @class NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>, NSEnumerator<ObjectType>, NSLocale, NSOperationQueue, NSCharacterSet;
238
+ @class NSIndexSet, NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>, NSEnumerator<ObjectType>, NSLocale, NSOperationQueue, NSCharacterSet;
246
239
 
247
- typedef struct _NSZone NSZone;
248
- @protocol NSCopying
249
- - (id)copyWithZone:(nullable struct _NSZone *)zone;
250
- @end
251
- @protocol NSMutableCopying
252
- - (id)mutableCopyWithZone:(nullable struct _NSZone *)zone;
253
- @end
254
240
  @protocol NSCoding
255
241
  - (void)encodeWithCoder:(NSCoder *)coder;
256
242
  - (nullable instancetype)initWithCoder:(NSCoder *)coder;
@@ -263,75 +249,511 @@ typedef struct { unsigned long state; id __unsafe_unretained _Nullable * _Nullab
263
249
  - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained _Nullable [_Nonnull])buffer count:(NSUInteger)len;
264
250
  @end
265
251
 
252
+ typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
253
+
254
+ NSCaseInsensitiveSearch = 1,
255
+
256
+ NSLiteralSearch = 2,
257
+
258
+ NSBackwardsSearch = 4,
259
+
260
+ NSAnchoredSearch = 8,
261
+
262
+ NSNumericSearch = 64,
263
+
264
+ NSDiacriticInsensitiveSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 128,
265
+
266
+ NSWidthInsensitiveSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 256,
267
+
268
+ NSForcedOrderingSearch API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) = 512,
269
+ #if 1
270
+
271
+ NSRegularExpressionSearch API_AVAILABLE(macos(10.7), ios(3.2), watchos(2.0), tvos(9.0)) = 1024
272
+ #endif
273
+ };
274
+
275
+ typedef NSUInteger NSStringEncoding;
276
+ NS_ENUM(NSStringEncoding) {
277
+
278
+ NSASCIIStringEncoding = 1,
279
+
280
+ NSNEXTSTEPStringEncoding = 2,
281
+
282
+ NSJapaneseEUCStringEncoding = 3,
283
+
284
+ NSUTF8StringEncoding = 4,
285
+
286
+ NSISOLatin1StringEncoding = 5,
287
+
288
+ NSSymbolStringEncoding = 6,
289
+
290
+ NSNonLossyASCIIStringEncoding = 7,
291
+
292
+ NSShiftJISStringEncoding = 8,
293
+
294
+ NSISOLatin2StringEncoding = 9,
295
+
296
+ NSUnicodeStringEncoding = 10,
297
+
298
+ NSWindowsCP1251StringEncoding = 11,
299
+
300
+ NSWindowsCP1252StringEncoding = 12,
301
+
302
+ NSWindowsCP1253StringEncoding = 13,
303
+
304
+ NSWindowsCP1254StringEncoding = 14,
305
+
306
+ NSWindowsCP1250StringEncoding = 15,
307
+
308
+ NSISO2022JPStringEncoding = 21,
309
+
310
+ NSMacOSRomanStringEncoding = 30,
311
+
312
+ NSUTF16StringEncoding = NSUnicodeStringEncoding,
313
+
314
+ NSUTF16BigEndianStringEncoding = 0x90000100,
315
+
316
+ NSUTF16LittleEndianStringEncoding = 0x94000100,
317
+
318
+ NSUTF32StringEncoding = 0x8c000100,
319
+
320
+ NSUTF32BigEndianStringEncoding = 0x98000100,
321
+
322
+ NSUTF32LittleEndianStringEncoding = 0x9c000100
323
+ };
324
+
325
+ typedef NS_OPTIONS(NSUInteger, NSStringEncodingConversionOptions) {
326
+
327
+ NSStringEncodingConversionAllowLossy = 1,
328
+
329
+ NSStringEncodingConversionExternalRepresentation = 2
330
+ };
331
+
266
332
  __attribute__((swift_bridge("Swift.String")))
267
333
  @interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
268
- - (NSArray<NSString *> *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)separator __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
269
- @property (readonly) double doubleValue;
270
- - (BOOL)canBeConvertedToEncoding:(NSStringEncoding)encoding;
334
+
271
335
  @property (readonly) NSUInteger length;
272
- @property (readonly) NSInteger integerValue;
273
- @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER;
274
- @property (nullable, readonly) const char *UTF8String NS_RETURNS_INNER_POINTER;
275
- @property (nullable, readonly, copy) NSString *stringByRemovingPercentEncoding;
276
- @property (readonly) BOOL boolValue __attribute__((availability(ios,introduced=2.0)));
277
- @property (readonly) int intValue;
278
- - (nullable const char *)cStringUsingEncoding:(NSStringEncoding)encoding NS_RETURNS_INNER_POINTER;
279
- + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc NS_FORMAT_ARGUMENT(1);
280
- - (NSComparisonResult)localizedStandardCompare:(NSString *)string __attribute__((availability(ios,introduced=4.0)));
336
+
281
337
  - (unichar)characterAtIndex:(NSUInteger)index;
338
+
339
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
340
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
341
+ @end
342
+
343
+ @interface NSString (NSStringExtensionMethods)
344
+
345
+ - (NSString *)substringFromIndex:(NSUInteger)from;
346
+
347
+ - (NSString *)substringToIndex:(NSUInteger)to;
348
+
349
+ - (NSString *)substringWithRange:(NSRange)range; // Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
350
+
351
+ - (void)getCharacters:(unichar *)buffer range:(NSRange)range; // Use with rangeOfComposedCharacterSequencesForRange: to avoid breaking up character sequences
352
+
353
+ - (NSComparisonResult)compare:(NSString *)string;
354
+
355
+ - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
356
+
357
+ - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare;
358
+
359
+ - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToCompare locale:(nullable id)locale; // locale arg used to be a dictionary pre-Leopard. We now accept NSLocale. Assumes the current locale if non-nil and non-NSLocale. nil continues to mean canonical compare, which doesn't depend on user's locale choice.
360
+
361
+ - (NSComparisonResult)caseInsensitiveCompare:(NSString *)string;
362
+
363
+ - (NSComparisonResult)localizedCompare:(NSString *)string;
364
+
365
+ - (NSComparisonResult)localizedCaseInsensitiveCompare:(NSString *)string;
366
+
367
+ - (NSComparisonResult)localizedStandardCompare:(NSString *)string API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
368
+
282
369
  - (BOOL)isEqualToString:(NSString *)aString;
283
- - (BOOL)containsString:(NSString *)str;
370
+
284
371
  - (BOOL)hasPrefix:(NSString *)str;
372
+
285
373
  - (BOOL)hasSuffix:(NSString *)str;
286
- - (NSString *)substringToIndex:(NSUInteger)to;
287
- - (NSString *)stringByAppendingFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
288
- @property (readonly, copy) NSString *stringByDeletingPathExtension;
289
- @property (readonly, copy) NSString *pathExtension;
290
- - (nullable NSString *)stringByAppendingPathExtension:(NSString *)str;
291
- @property (readonly, copy) NSString *stringByDeletingLastPathComponent;
292
- - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer;
293
- - (instancetype)initWithFormat:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
294
- @property (readonly, copy) NSString *lastPathComponent;
374
+
375
+ - (NSString *)commonPrefixWithString:(NSString *)str options:(NSStringCompareOptions)mask;
376
+
377
+ - (BOOL)containsString:(NSString *)str API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
378
+
379
+ - (BOOL)localizedCaseInsensitiveContainsString:(NSString *)str API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
380
+
381
+ - (BOOL)localizedStandardContainsString:(NSString *)str API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
382
+
383
+ - (NSRange)localizedStandardRangeOfString:(NSString *)str API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
384
+
295
385
  - (NSRange)rangeOfString:(NSString *)searchString;
386
+
296
387
  - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask;
388
+
297
389
  - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
298
- - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(nullable NSLocale *)locale __attribute__((availability(ios,introduced=2.0)));
299
- @property (readonly, copy) NSString *lowercaseString;
300
- @property (readonly, copy) NSString *uppercaseString;
390
+
391
+ - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
392
+
301
393
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet;
394
+
302
395
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask;
396
+
303
397
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
304
- + (instancetype)string;
398
+
399
+ - (NSRange)rangeOfComposedCharacterSequenceAtIndex:(NSUInteger)index;
400
+
401
+ - (NSRange)rangeOfComposedCharacterSequencesForRange:(NSRange)range API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
402
+
305
403
  - (NSString *)stringByAppendingString:(NSString *)aString;
306
- - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;
307
- - (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);
308
- - (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
309
- + (instancetype)stringWithString:(NSString *)string NS_FORMAT_ARGUMENT(1);
404
+
405
+
406
+ @property (readonly) double doubleValue;
407
+
408
+ @property (readonly) float floatValue;
409
+
410
+ @property (readonly) int intValue;
411
+
412
+ @property (readonly) NSInteger integerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
413
+
414
+ @property (readonly) long long longLongValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
415
+
416
+ @property (readonly) BOOL boolValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)); // Skips initial space characters (whitespaceSet), or optional -/+ sign followed by zeroes. Returns YES on encountering one of "Y", "y", "T", "t", or a digit 1-9. It ignores any trailing characters.
417
+
418
+ @property (readonly, copy) NSString *uppercaseString;
419
+
420
+ @property (readonly, copy) NSString *lowercaseString;
421
+
422
+ @property (readonly, copy) NSString *capitalizedString;
423
+
424
+ @property (readonly, copy) NSString *localizedUppercaseString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
425
+
426
+ @property (readonly, copy) NSString *localizedLowercaseString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
427
+
428
+ @property (readonly, copy) NSString *localizedCapitalizedString API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
429
+
430
+ - (NSString *)uppercaseStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
431
+
432
+ - (NSString *)lowercaseStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
433
+
434
+ - (NSString *)capitalizedStringWithLocale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
435
+
436
+ - (void)getLineStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)lineEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range;
437
+
438
+ - (NSRange)lineRangeForRange:(NSRange)range;
439
+
440
+ - (void)getParagraphStart:(nullable NSUInteger *)startPtr end:(nullable NSUInteger *)parEndPtr contentsEnd:(nullable NSUInteger *)contentsEndPtr forRange:(NSRange)range;
441
+
442
+ - (NSRange)paragraphRangeForRange:(NSRange)range;
443
+
444
+ typedef NS_OPTIONS(NSUInteger, NSStringEnumerationOptions) {
445
+
446
+ NSStringEnumerationByLines = 0, // Equivalent to lineRangeForRange:
447
+ NSStringEnumerationByParagraphs = 1, // Equivalent to paragraphRangeForRange:
448
+ NSStringEnumerationByComposedCharacterSequences = 2, // Equivalent to rangeOfComposedCharacterSequencesForRange:
449
+ NSStringEnumerationByWords = 3,
450
+ NSStringEnumerationBySentences = 4,
451
+ NSStringEnumerationByCaretPositions API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) = 5, // Enumerate text editing cursor positions. It could separate characters within a grapheme cluster.
452
+ NSStringEnumerationByDeletionClusters API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) = 6, // Enumerate text editing positions for backwards deletion. It could separate characters within a grapheme cluster.
453
+
454
+ NSStringEnumerationReverse = 1UL << 8,
455
+ NSStringEnumerationSubstringNotRequired = 1UL << 9,
456
+ NSStringEnumerationLocalized = 1UL << 10 // User's default locale
457
+ };
458
+
459
+ - (void)enumerateSubstringsInRange:(NSRange)range options:(NSStringEnumerationOptions)opts usingBlock:(void (^)(NSString * _Nullable substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
460
+
461
+ - (void)enumerateLinesUsingBlock:(void (^)(NSString *line, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
462
+
463
+ @property (nullable, readonly) const char *UTF8String NS_RETURNS_INNER_POINTER; // Convenience to return null-terminated UTF8 representation
464
+
465
+ @property (readonly) NSStringEncoding fastestEncoding; // Result in O(1) time; a rough estimate
466
+
467
+ @property (readonly) NSStringEncoding smallestEncoding; // Result in O(n) time; the encoding in which the string is most compact
468
+
469
+ - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding allowLossyConversion:(BOOL)lossy; // External representation
470
+
471
+ - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding; // External representation
472
+
473
+ - (BOOL)canBeConvertedToEncoding:(NSStringEncoding)encoding;
474
+
475
+ - (nullable const char *)cStringUsingEncoding:(NSStringEncoding)encoding NS_RETURNS_INNER_POINTER; // "Autoreleased"; NULL return if encoding conversion not possible; for performance reasons, lifetime of this should not be considered longer than the lifetime of the receiving string (if the receiver string is freed, this might go invalid then, before the end of the autorelease scope). Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
476
+
477
+ - (BOOL)getCString:(char *)buffer maxLength:(NSUInteger)maxBufferCount encoding:(NSStringEncoding)encoding; // NO return if conversion not possible due to encoding errors or too small of a buffer. The buffer should include room for maxBufferCount bytes; this number should accomodate the expected size of the return value plus the NULL termination character, which this method adds. (So note that the maxLength passed to this method is one more than the one you would have passed to the deprecated getCString:maxLength:.) Use only with 8-bit encodings, and not encodings such as UTF-16 or UTF-32.
478
+
479
+ - (BOOL)getBytes:(nullable void *)buffer maxLength:(NSUInteger)maxBufferCount usedLength:(nullable NSUInteger *)usedBufferCount encoding:(NSStringEncoding)encoding options:(NSStringEncodingConversionOptions)options range:(NSRange)range remainingRange:(nullable NSRangePointer)leftover;
480
+
481
+ - (NSUInteger)maximumLengthOfBytesUsingEncoding:(NSStringEncoding)enc; // Result in O(1) time; the estimate may be way over what's needed. Returns 0 on error (overflow)
482
+
483
+ - (NSUInteger)lengthOfBytesUsingEncoding:(NSStringEncoding)enc; // Result in O(n) time; the result is exact. Returns 0 on error (cannot convert to specified encoding, or overflow)
484
+
485
+ @property (class, readonly) const NSStringEncoding *availableStringEncodings;
486
+
487
+ + (NSString *)localizedNameOfStringEncoding:(NSStringEncoding)encoding;
488
+
489
+ @property (class, readonly) NSStringEncoding defaultCStringEncoding; // Should be rarely used
490
+
491
+ @property (readonly, copy) NSString *decomposedStringWithCanonicalMapping;
492
+
493
+ @property (readonly, copy) NSString *precomposedStringWithCanonicalMapping;
494
+
495
+ @property (readonly, copy) NSString *decomposedStringWithCompatibilityMapping;
496
+
497
+ @property (readonly, copy) NSString *precomposedStringWithCompatibilityMapping;
498
+
310
499
  - (NSArray<NSString *> *)componentsSeparatedByString:(NSString *)separator;
311
- - (NSString *)stringByAppendingPathComponent:(NSString *)str;
500
+
501
+ - (NSArray<NSString *> *)componentsSeparatedByCharactersInSet:(NSCharacterSet *)separator API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
502
+
503
+ - (NSString *)stringByTrimmingCharactersInSet:(NSCharacterSet *)set;
504
+
505
+ - (NSString *)stringByPaddingToLength:(NSUInteger)newLength withString:(NSString *)padString startingAtIndex:(NSUInteger)padIndex;
506
+
507
+ - (NSString *)stringByFoldingWithOptions:(NSStringCompareOptions)options locale:(nullable NSLocale *)locale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
508
+
509
+ - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
510
+
511
+ - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
512
+
513
+ - (NSString *)stringByReplacingCharactersInRange:(NSRange)range withString:(NSString *)replacement API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
514
+
515
+ #if 1
516
+
517
+ typedef NSString *NSStringTransform NS_TYPED_EXTENSIBLE_ENUM;
518
+
519
+ - (nullable NSString *)stringByApplyingTransform:(NSStringTransform)transform reverse:(BOOL)reverse API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)); // Returns nil if reverse not applicable or transform is invalid
520
+
521
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToKatakana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
522
+
523
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHiragana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
524
+
525
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHangul API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
526
+
527
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToArabic API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
528
+
529
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToHebrew API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
530
+
531
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToThai API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
532
+
533
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToCyrillic API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
534
+
535
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformLatinToGreek API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
536
+
537
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformToLatin API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
538
+
539
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformMandarinToLatin API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
540
+
541
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformHiraganaToKatakana API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
542
+
543
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformFullwidthToHalfwidth API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
544
+
545
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformToXMLHex API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
546
+
547
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformToUnicodeName API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
548
+
549
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformStripCombiningMarks API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
550
+
551
+ FOUNDATION_EXPORT NSStringTransform const NSStringTransformStripDiacritics API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
552
+
553
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;
554
+
555
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile encoding:(NSStringEncoding)enc error:(NSError **)error;
556
+ #endif
557
+
558
+ @property (readonly, copy) NSString *description;
559
+
560
+ @property (readonly) NSUInteger hash;
561
+
562
+ - (instancetype)initWithCharactersNoCopy:(unichar *)characters length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer;
563
+ - (instancetype)initWithCharactersNoCopy:(unichar *)chars length:(NSUInteger)len deallocator:(void(^_Nullable)(unichar *, NSUInteger))deallocator;
564
+
565
+ - (instancetype)initWithCharacters:(const unichar *)characters length:(NSUInteger)length;
566
+
567
+ - (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
568
+
569
+ - (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);
570
+
571
+
572
+
573
+
574
+
312
575
  - (nullable instancetype)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding;
313
- - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding;
576
+
314
577
  - (nullable instancetype)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding;
578
+
579
+ - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer;
580
+ - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding deallocator:(void(^_Nullable)(void *, NSUInteger))deallocator;
581
+
582
+ + (instancetype)string;
583
+
584
+ + (instancetype)stringWithString:(NSString *)string NS_FORMAT_ARGUMENT(1);
585
+
586
+ + (instancetype)stringWithCharacters:(const unichar *)characters length:(NSUInteger)length;
587
+
315
588
  + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
316
- + (instancetype)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
317
- - (instancetype)init NS_DESIGNATED_INITIALIZER;
318
- - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
319
- @end
320
- @interface NSString (NSURLUtilities)
321
- - (nullable NSString *)stringByAddingPercentEncodingWithAllowedCharacters:(NSCharacterSet *)allowedCharacters __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
589
+
590
+
591
+
592
+ - (nullable instancetype)initWithCString:(const char *)nullTerminatedCString encoding:(NSStringEncoding)encoding NS_FORMAT_ARGUMENT(1);
593
+
594
+ + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc NS_FORMAT_ARGUMENT(1);
595
+
596
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error;
597
+
598
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;
599
+
600
+ + (nullable instancetype)stringWithContentsOfURL:(NSURL *)url encoding:(NSStringEncoding)enc error:(NSError **)error;
601
+
602
+ + (nullable instancetype)stringWithContentsOfFile:(NSString *)path encoding:(NSStringEncoding)enc error:(NSError **)error;
603
+
604
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
605
+
606
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
607
+
608
+ + (nullable instancetype)stringWithContentsOfURL:(NSURL *)url usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
609
+
610
+ + (nullable instancetype)stringWithContentsOfFile:(NSString *)path usedEncoding:(nullable NSStringEncoding *)enc error:(NSError **)error;
611
+
322
612
  @end
323
- @interface NSString (NSStringExtensionMethods)
324
- - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
325
- @property (readonly) float floatValue;
326
- - (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
327
- - (NSString *)substringFromIndex:(NSUInteger)from;
328
- - (NSString *)substringWithRange:(NSRange)range;
329
- - (NSRange)rangeOfComposedCharacterSequencesForRange:(NSRange)range __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
613
+
614
+ #if 1
615
+ typedef NSString * NSStringEncodingDetectionOptionsKey NS_TYPED_ENUM;
616
+
617
+ @interface NSString (NSStringEncodingDetection)
618
+
619
+ + (NSStringEncoding)stringEncodingForData:(NSData *)data
620
+ encodingOptions:(nullable NSDictionary<NSStringEncodingDetectionOptionsKey, id> *)opts
621
+ convertedString:(NSString * _Nullable * _Nullable)string
622
+ usedLossyConversion:(nullable BOOL *)usedLossyConversion API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
623
+
624
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionSuggestedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
625
+
626
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionDisallowedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
627
+
628
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionUseOnlySuggestedEncodingsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
629
+
630
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionAllowLossyKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
631
+
632
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionFromWindowsKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
633
+
634
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLossySubstitutionKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
635
+
636
+ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDetectionLikelyLanguageKey API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
637
+
330
638
  @end
639
+ #endif
640
+
331
641
  @interface NSMutableString : NSString
642
+
643
+ - (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString;
644
+
645
+ @end
646
+
647
+ @interface NSMutableString (NSMutableStringExtensionMethods)
648
+
649
+ - (void)insertString:(NSString *)aString atIndex:(NSUInteger)loc;
650
+
651
+ - (void)deleteCharactersInRange:(NSRange)range;
652
+
332
653
  - (void)appendString:(NSString *)aString;
333
- - (void)appendFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
654
+
655
+
656
+ - (void)setString:(NSString *)aString;
657
+
658
+ - (NSUInteger)replaceOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(NSStringCompareOptions)options range:(NSRange)searchRange;
659
+
660
+ #if 1
661
+
662
+ - (BOOL)applyTransform:(NSStringTransform)transform reverse:(BOOL)reverse range:(NSRange)range updatedRange:(nullable NSRangePointer)resultingRange API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
663
+ #endif
664
+
665
+ - (NSMutableString *)initWithCapacity:(NSUInteger)capacity;
666
+
334
667
  + (NSMutableString *)stringWithCapacity:(NSUInteger)capacity;
668
+
669
+ @end
670
+
671
+
672
+
673
+ #define NSMaximumStringLength (INT_MAX-1)
674
+
675
+ @interface NSString (NSExtendedStringPropertyListParsing)
676
+
677
+ - (id)propertyList;
678
+
679
+ - (nullable NSDictionary *)propertyListFromStringsFileFormat;
680
+
681
+ @end
682
+
683
+ @interface NSString (NSStringPathExtensions)
684
+ - (nullable NSString *)stringByAppendingPathExtension:(NSString *)str;
685
+ - (NSString *)stringByAppendingPathComponent:(NSString *)str;
686
+ @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER;
687
+ @property (readonly, copy) NSString *stringByDeletingPathExtension;
688
+ @property (readonly, copy) NSString *pathExtension;
689
+ @property (readonly, copy) NSString *stringByDeletingLastPathComponent;
690
+ @property (readonly, copy) NSString *lastPathComponent;
691
+ @end
692
+
693
+ @interface NSString (NSURLUtilities)
694
+ @property (nullable, readonly, copy) NSString *stringByRemovingPercentEncoding;
695
+ - (nullable NSString *)stringByAddingPercentEncodingWithAllowedCharacters:(NSCharacterSet *)allowedCharacters __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
696
+ @end
697
+
698
+ @interface NSString (NSStringDeprecated)
699
+
700
+ - (nullable const char *)cString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
701
+
702
+ - (nullable const char *)lossyCString NS_RETURNS_INNER_POINTER API_DEPRECATED("Use -cStringUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
703
+
704
+ - (NSUInteger)cStringLength API_DEPRECATED("Use -lengthOfBytesUsingEncoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
705
+
706
+ - (void)getCString:(char *)bytes API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
707
+ - (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
708
+ - (void)getCString:(char *)bytes maxLength:(NSUInteger)maxLength range:(NSRange)aRange remainingRange:(nullable NSRangePointer)leftoverRange API_DEPRECATED("Use -getCString:maxLength:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
709
+
710
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile API_DEPRECATED("Use -writeToFile:atomically:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
711
+
712
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically API_DEPRECATED("Use -writeToURL:atomically:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
713
+
714
+ - (nullable id)initWithContentsOfFile:(NSString *)path API_DEPRECATED("Use -initWithContentsOfFile:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
715
+
716
+ - (nullable id)initWithContentsOfURL:(NSURL *)url API_DEPRECATED("Use -initWithContentsOfURL:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
717
+ + (nullable id)stringWithContentsOfFile:(NSString *)path API_DEPRECATED("Use +stringWithContentsOfFile:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
718
+ + (nullable id)stringWithContentsOfURL:(NSURL *)url API_DEPRECATED("Use +stringWithContentsOfURL:encoding:error: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
719
+
720
+ - (nullable id)initWithCStringNoCopy:(char *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
721
+ - (nullable id)initWithCString:(const char *)bytes length:(NSUInteger)length API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
722
+ - (nullable id)initWithCString:(const char *)bytes API_DEPRECATED("Use -initWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
723
+ + (nullable id)stringWithCString:(const char *)bytes length:(NSUInteger)length API_DEPRECATED("Use +stringWithCString:encoding:", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
724
+ + (nullable id)stringWithCString:(const char *)bytes API_DEPRECATED("Use +stringWithCString:encoding: instead", macos(10.0,10.4), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
725
+
726
+ - (void)getCharacters:(unichar *)buffer;
727
+
728
+ @end
729
+
730
+ NS_ENUM(NSStringEncoding) {
731
+
732
+ NSProprietaryStringEncoding = 65536
733
+ };
734
+
735
+ #if !defined(_OBJC_UNICHAR_H_)
736
+ #define _OBJC_UNICHAR_H_
737
+ #endif
738
+ #define NS_UNICHAR_IS_EIGHT_BIT 0
739
+
740
+ @interface NSString (NSStringFormatting)
741
+ - (NSString *)stringByAppendingFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
742
+ - (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
743
+ - (instancetype)initWithFormat:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
744
+ - (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale, ... NS_FORMAT_FUNCTION(1,3);
745
+ - (instancetype)initWithFormat:(NSString *)format locale:(nullable id)locale arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
746
+ - (nullable instancetype)initWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers error:(NSError **)error, ... NS_FORMAT_FUNCTION(2, 4) API_AVAILABLE(macos(13.0), ios(16.0), watchos(8.0), tvos(8.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
747
+ - (nullable instancetype)initWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers locale:(nullable id)locale error:(NSError **)error, ... NS_FORMAT_FUNCTION(2, 5) API_AVAILABLE(macos(13.0), ios(16.0), watchos(8.0), tvos(8.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
748
+ - (nullable instancetype)initWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers arguments:(va_list)argList error:(NSError **)error NS_FORMAT_FUNCTION(2, 0) API_AVAILABLE(macos(13.0), ios(16.0), watchos(8.0), tvos(8.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
749
+ - (nullable instancetype)initWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers locale:(nullable id)locale arguments:(va_list)argList error:(NSError **)error NS_FORMAT_FUNCTION(2, 0) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
750
+ + (instancetype)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
751
+ + (instancetype)localizedStringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
752
+ + (nullable instancetype)stringWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers error:(NSError **)error, ... NS_FORMAT_FUNCTION(2,4) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
753
+ + (nullable instancetype)localizedStringWithValidatedFormat:(NSString *)format validFormatSpecifiers:(NSString *)validFormatSpecifiers error:(NSError **)error, ... NS_FORMAT_FUNCTION(2, 4) API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use string interpolations instead");
754
+ @end
755
+ @interface NSMutableString (NSStringFormatting)
756
+ - (void)appendFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
335
757
  @end
336
758
  NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
337
759
  @interface NSSimpleCString : NSString {
@@ -355,127 +777,324 @@ typedef NSString *NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(N
355
777
 
356
778
  __attribute__((swift_bridge("Swift.Array")))
357
779
  @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
358
- - (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray;
359
- - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;
360
- + (instancetype)arrayWithObject:(ObjectType)anObject;
361
- - (NSEnumerator<ObjectType> *)reverseObjectEnumerator;
362
780
  @property (readonly) NSUInteger count;
363
- @property (nullable, nonatomic, readonly) ObjectType firstObject;
364
- @property (nullable, nonatomic, readonly) ObjectType lastObject;
365
781
  - (ObjectType)objectAtIndex:(NSUInteger)index;
782
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
783
+ - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
784
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
785
+ @end
786
+ @interface NSArray<ObjectType> (NSExtendedArray)
787
+ - (NSArray<ObjectType> *)arrayByAddingObject:(ObjectType)anObject;
788
+ - (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray;
366
789
  - (NSString *)componentsJoinedByString:(NSString *)separator;
367
- - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx;
368
790
  - (BOOL)containsObject:(ObjectType)anObject;
369
- - (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range;
370
- - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
371
- - (NSArray<ObjectType> *)sortedArrayUsingSelector:(SEL)comparator;
791
+ @property (readonly, copy) NSString *description;
792
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
793
+ - (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level;
794
+ - (nullable ObjectType)firstObjectCommonWithArray:(NSArray<ObjectType> *)otherArray;
795
+ - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects range:(NSRange)range NS_SWIFT_UNAVAILABLE("Use 'subarrayWithRange()' instead");
796
+ - (NSUInteger)indexOfObject:(ObjectType)anObject;
797
+ - (NSUInteger)indexOfObject:(ObjectType)anObject inRange:(NSRange)range;
798
+ - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;
799
+ - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
800
+ - (BOOL)isEqualToArray:(NSArray<ObjectType> *)otherArray;
801
+ @property (nullable, nonatomic, readonly) ObjectType firstObject API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
802
+ @property (nullable, nonatomic, readonly) ObjectType lastObject;
372
803
  - (NSEnumerator<ObjectType> *)objectEnumerator;
373
- - (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
804
+ - (NSEnumerator<ObjectType> *)reverseObjectEnumerator;
805
+ @property (readonly, copy) NSData *sortedArrayHint;
806
+ - (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context;
807
+ - (NSArray<ObjectType> *)sortedArrayUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))comparator context:(nullable void *)context hint:(nullable NSData *)hint;
808
+ - (NSArray<ObjectType> *)sortedArrayUsingSelector:(SEL)comparator;
809
+ - (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range;
810
+ - (BOOL)writeToURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
811
+ - (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
812
+ - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
813
+ - (NSArray<ObjectType> *)objectsAtIndexes:(NSIndexSet *)indexes;
814
+ - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
815
+ - (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
816
+ - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
817
+ - (void)enumerateObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
818
+ - (NSUInteger)indexOfObjectPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
819
+ - (NSUInteger)indexOfObjectWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
820
+ - (NSUInteger)indexOfObjectAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
821
+ - (NSIndexSet *)indexesOfObjectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
822
+ - (NSIndexSet *)indexesOfObjectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
823
+ - (NSIndexSet *)indexesOfObjectsAtIndexes:(NSIndexSet *)s options:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
824
+ - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
825
+ - (NSArray<ObjectType> *)sortedArrayWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
826
+ typedef NS_OPTIONS(NSUInteger, NSBinarySearchingOptions) {
827
+ NSBinarySearchingFirstEqual = (1UL << 8),
828
+ NSBinarySearchingLastEqual = (1UL << 9),
829
+ NSBinarySearchingInsertionIndex = (1UL << 10),
830
+ };
831
+ - (NSUInteger)indexOfObject:(ObjectType)obj inSortedRange:(NSRange)r options:(NSBinarySearchingOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmp API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
832
+ @end
833
+ @interface NSArray<ObjectType> (NSArrayCreation)
374
834
  + (instancetype)array;
835
+ + (instancetype)arrayWithObject:(ObjectType)anObject;
375
836
  + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
376
- + (instancetype)arrayWithArray:(NSArray<ObjectType> *)array;
377
837
  + (instancetype)arrayWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
838
+ + (instancetype)arrayWithArray:(NSArray<ObjectType> *)array;
839
+ - (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
840
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array;
378
841
  - (instancetype)initWithArray:(NSArray<ObjectType> *)array copyItems:(BOOL)flag;
842
+ - (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
843
+ + (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use initializer instead");
379
844
  @end
380
- @interface NSArray<ObjectType> (NSExtendedArray)
381
- - (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, NSUInteger idx, BOOL *stop))block __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
845
+ @interface NSArray<ObjectType> (NSDeprecated)
846
+ - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nonnull])objects NS_SWIFT_UNAVAILABLE("Use 'as [AnyObject]' instead") API_DEPRECATED("Use -getObjects:range: instead", macos(10.0, 10.13), ios(2.0, 11.0), watchos(2.0, 4.0), tvos(9.0, 11.0));
847
+ + (nullable NSArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("arrayWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
848
+ + (nullable NSArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("arrayWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
849
+ - (nullable NSArray<ObjectType> *)initWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
850
+ - (nullable NSArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
851
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
852
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
382
853
  @end
383
854
  @interface NSMutableArray<ObjectType> : NSArray<ObjectType>
384
- - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=6.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
385
- - (void)removeObjectIdenticalTo:(ObjectType)anObject;
386
- - (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
387
- + (instancetype)arrayWithCapacity:(NSUInteger)numItems;
388
- - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
389
855
  - (void)addObject:(ObjectType)anObject;
856
+ - (void)insertObject:(ObjectType)anObject atIndex:(NSUInteger)index;
857
+ - (void)removeLastObject;
858
+ - (void)removeObjectAtIndex:(NSUInteger)index;
859
+ - (void)replaceObjectAtIndex:(NSUInteger)index withObject:(ObjectType)anObject;
860
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
861
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
862
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
863
+ @end
864
+ @interface NSMutableArray<ObjectType> (NSExtendedMutableArray)
390
865
  - (void)addObjectsFromArray:(NSArray<ObjectType> *)otherArray;
391
- - (void)removeObject:(ObjectType)anObject;
866
+ - (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2;
392
867
  - (void)removeAllObjects;
868
+ - (void)removeObject:(ObjectType)anObject inRange:(NSRange)range;
869
+ - (void)removeObject:(ObjectType)anObject;
870
+ - (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
871
+ - (void)removeObjectIdenticalTo:(ObjectType)anObject;
872
+ - (void)removeObjectsFromIndices:(NSUInteger *)indices numIndices:(NSUInteger)cnt API_DEPRECATED("Not supported", macos(10.0,10.6), ios(2.0,4.0), watchos(2.0,2.0), tvos(9.0,9.0));
393
873
  - (void)removeObjectsInArray:(NSArray<ObjectType> *)otherArray;
394
- - (void)removeLastObject;
874
+ - (void)removeObjectsInRange:(NSRange)range;
875
+ - (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray range:(NSRange)otherRange;
876
+ - (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray<ObjectType> *)otherArray;
877
+ - (void)setArray:(NSArray<ObjectType> *)otherArray;
878
+ - (void)sortUsingFunction:(NSInteger (NS_NOESCAPE *)(ObjectType, ObjectType, void * _Nullable))compare context:(nullable void *)context;
395
879
  - (void)sortUsingSelector:(SEL)comparator;
396
- - (void)sortUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
397
- - (void)removeObjectAtIndex:(NSUInteger)index;
880
+ - (void)insertObjects:(NSArray<ObjectType> *)objects atIndexes:(NSIndexSet *)indexes;
881
+ - (void)removeObjectsAtIndexes:(NSIndexSet *)indexes;
882
+ - (void)replaceObjectsAtIndexes:(NSIndexSet *)indexes withObjects:(NSArray<ObjectType> *)objects;
883
+ - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
884
+ - (void)sortUsingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
885
+ - (void)sortWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
886
+ @end
887
+ @interface NSMutableArray<ObjectType> (NSMutableArrayCreation)
888
+ + (instancetype)arrayWithCapacity:(NSUInteger)numItems;
889
+ + (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfFile:(NSString *)path;
890
+ + (nullable NSMutableArray<ObjectType> *)arrayWithContentsOfURL:(NSURL *)url;
891
+ - (nullable NSMutableArray<ObjectType> *)initWithContentsOfFile:(NSString *)path;
892
+ - (nullable NSMutableArray<ObjectType> *)initWithContentsOfURL:(NSURL *)url;
398
893
  @end
399
894
  __attribute__((swift_bridge("Swift.Dictionary")))
400
895
  @interface NSDictionary<__covariant KeyType, __covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
401
- - (NSArray<KeyType> *)keysSortedByValueWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
402
- - (BOOL)isEqualToDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
403
896
  @property (readonly) NSUInteger count;
404
897
  - (nullable ObjectType)objectForKey:(KeyType)aKey;
405
- - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key;
406
- - (unsigned long long)fileSize;
898
+ - (NSEnumerator<KeyType> *)keyEnumerator;
899
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
900
+ - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
901
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
902
+ @end
903
+ @interface NSDictionary<KeyType, ObjectType> (NSExtendedDictionary)
407
904
  @property (readonly, copy) NSArray<KeyType> *allKeys;
905
+ - (NSArray<KeyType> *)allKeysForObject:(ObjectType)anObject;
408
906
  @property (readonly, copy) NSArray<ObjectType> *allValues;
409
- - (NSEnumerator<KeyType> *)keyEnumerator;
907
+ @property (readonly, copy) NSString *description;
908
+ @property (readonly, copy) NSString *descriptionInStringsFileFormat;
909
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
910
+ - (NSString *)descriptionWithLocale:(nullable id)locale indent:(NSUInteger)level;
911
+ - (BOOL)isEqualToDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
410
912
  - (NSEnumerator<ObjectType> *)objectEnumerator;
411
913
  - (NSArray<ObjectType> *)objectsForKeys:(NSArray<KeyType> *)keys notFoundMarker:(ObjectType)marker;
412
- - (void)enumerateKeysAndObjectsUsingBlock:(void (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block;
914
+ - (BOOL)writeToURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
915
+ - (NSArray<KeyType> *)keysSortedByValueUsingSelector:(SEL)comparator;
916
+ - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nullable])objects andKeys:(KeyType _Nonnull __unsafe_unretained [_Nullable])keys count:(NSUInteger)count API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) NS_SWIFT_UNAVAILABLE("Use 'allKeys' and/or 'allValues' instead");
917
+ - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
918
+ - (void)enumerateKeysAndObjectsUsingBlock:(void (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
919
+ - (void)enumerateKeysAndObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
920
+ - (NSArray<KeyType> *)keysSortedByValueUsingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
921
+ - (NSArray<KeyType> *)keysSortedByValueWithOptions:(NSSortOptions)opts usingComparator:(NSComparator NS_NOESCAPE)cmptr API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
922
+ - (NSSet<KeyType> *)keysOfEntriesPassingTest:(BOOL (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
923
+ - (NSSet<KeyType> *)keysOfEntriesWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(KeyType key, ObjectType obj, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
924
+ @end
925
+ @interface NSDictionary<KeyType, ObjectType> (NSDeprecated)
926
+ - (void)getObjects:(ObjectType _Nonnull __unsafe_unretained [_Nullable])objects andKeys:(KeyType _Nonnull __unsafe_unretained [_Nullable])keys NS_SWIFT_UNAVAILABLE("Use 'allKeys' and/or 'allValues' instead") API_DEPRECATED("Use -getObjects:andKeys:count: instead", macos(10.0, 10.13), ios(2.0, 11.0), watchos(2.0, 4.0), tvos(9.0, 11.0));
927
+ + (nullable NSDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("dictionaryWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
928
+ + (nullable NSDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("dictionaryWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
929
+ - (nullable NSDictionary<KeyType, ObjectType> *)initWithContentsOfFile:(NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
930
+ - (nullable NSDictionary<KeyType, ObjectType> *)initWithContentsOfURL:(NSURL *)url API_DEPRECATED_WITH_REPLACEMENT("initWithContentsOfURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
931
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
932
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically API_DEPRECATED_WITH_REPLACEMENT("writeToURL:error:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
933
+ @end
934
+ @interface NSDictionary<KeyType, ObjectType> (NSDictionaryCreation)
413
935
  + (instancetype)dictionary;
414
- + (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict;
415
- - (instancetype)initWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION;
416
- - (instancetype)initWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
417
936
  + (instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType <NSCopying>)key;
418
937
  + (instancetype)dictionaryWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt;
419
- + (instancetype)dictionaryWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
420
- @end
421
- @interface NSDictionary<KeyType, ObjectType> (NSDictionaryCreation)
422
938
  + (instancetype)dictionaryWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION NS_SWIFT_UNAVAILABLE("Use dictionary literals instead");
939
+ + (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict;
940
+ + (instancetype)dictionaryWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
423
941
  - (instancetype)initWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION;
424
- @end
425
- @interface NSDictionary<KeyType, ObjectType> (NSKeyValueCoding)
426
- - (nullable ObjectType)valueForKey:(NSString *)key;
942
+ - (instancetype)initWithDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
943
+ - (instancetype)initWithDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary copyItems:(BOOL)flag;
944
+ - (instancetype)initWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
945
+ - (nullable NSDictionary<NSString *, ObjectType> *)initWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
946
+ + (nullable NSDictionary<NSString *, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0)) NS_SWIFT_UNAVAILABLE("Use initializer instead");
427
947
  @end
428
948
  @interface NSMutableDictionary<KeyType, ObjectType> : NSDictionary<KeyType, ObjectType>
429
949
  - (void)removeObjectForKey:(KeyType)aKey;
430
- - (void)addEntriesFromDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
431
- - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
432
- + (instancetype)dictionaryWithCapacity:(NSUInteger)numItems;
433
950
  - (void)setObject:(ObjectType)anObject forKey:(KeyType <NSCopying>)aKey;
434
- - (void)setObject:(nullable ObjectType)obj forKeyedSubscript:(KeyType <NSCopying>)key;
951
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
952
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
953
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
954
+ @end
955
+ @interface NSMutableDictionary<KeyType, ObjectType> (NSExtendedMutableDictionary)
956
+ - (void)addEntriesFromDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
435
957
  - (void)removeAllObjects;
958
+ - (void)removeObjectsForKeys:(NSArray<KeyType> *)keyArray;
959
+ - (void)setDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
960
+ - (void)setObject:(nullable ObjectType)obj forKeyedSubscript:(KeyType <NSCopying>)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
961
+ @end
962
+ @interface NSMutableDictionary<KeyType, ObjectType> (NSMutableDictionaryCreation)
963
+ + (instancetype)dictionaryWithCapacity:(NSUInteger)numItems;
964
+ + (nullable NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfFile:(NSString *)path;
965
+ + (nullable NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithContentsOfURL:(NSURL *)url;
966
+ - (nullable NSMutableDictionary<KeyType, ObjectType> *)initWithContentsOfFile:(NSString *)path;
967
+ - (nullable NSMutableDictionary<KeyType, ObjectType> *)initWithContentsOfURL:(NSURL *)url;
968
+ @end
969
+ @interface NSDictionary<KeyType, ObjectType> (NSSharedKeySetDictionary)
970
+ + (id)sharedKeySetForKeys:(NSArray<KeyType <NSCopying>> *)keys API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
971
+ @end
972
+ @interface NSMutableDictionary<KeyType, ObjectType> (NSSharedKeySetDictionary)
973
+ + (NSMutableDictionary<KeyType, ObjectType> *)dictionaryWithSharedKeySet:(id)keyset API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
974
+ @end
975
+ @interface NSDictionary<K, V> (NSGenericFastEnumeration) <NSFastEnumeration>
976
+ - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(K __unsafe_unretained _Nullable [_Nonnull])buffer count:(NSUInteger)len;
977
+ @end
978
+ @interface NSDictionary<KeyType, ObjectType>(NSKeyValueCoding)
979
+ - (nullable ObjectType)valueForKey:(NSString *)key;
980
+ @end
981
+ @interface NSMutableDictionary<KeyType, ObjectType>(NSKeyValueCoding)
982
+ - (void)setValue:(nullable ObjectType)value forKey:(NSString *)key;
436
983
  @end
437
984
  __attribute__((swift_bridge("Swift.Set")))
438
985
  @interface NSSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
439
986
  @property (readonly) NSUInteger count;
440
- + (instancetype)set;
987
+ - (nullable ObjectType)member:(ObjectType)object;
988
+ - (NSEnumerator<ObjectType> *)objectEnumerator;
989
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
990
+ - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
991
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
992
+ @end
993
+ @interface NSSet<ObjectType> (NSExtendedSet)
994
+ @property (readonly, copy) NSArray<ObjectType> *allObjects;
441
995
  - (nullable ObjectType)anyObject;
996
+ - (BOOL)containsObject:(ObjectType)anObject;
997
+ @property (readonly, copy) NSString *description;
998
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
999
+ - (BOOL)intersectsSet:(NSSet<ObjectType> *)otherSet;
1000
+ - (BOOL)isEqualToSet:(NSSet<ObjectType> *)otherSet;
1001
+ - (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)otherSet;
442
1002
  - (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
443
- - (NSSet<ObjectType> *)objectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))predicate;
1003
+ - (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
1004
+ - (NSSet<ObjectType> *)setByAddingObject:(ObjectType)anObject API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1005
+ - (NSSet<ObjectType> *)setByAddingObjectsFromSet:(NSSet<ObjectType> *)other API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1006
+ - (NSSet<ObjectType> *)setByAddingObjectsFromArray:(NSArray<ObjectType> *)other API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1007
+ - (void)enumerateObjectsUsingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1008
+ - (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))block API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1009
+ - (NSSet<ObjectType> *)objectsPassingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1010
+ - (NSSet<ObjectType> *)objectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (NS_NOESCAPE ^)(ObjectType obj, BOOL *stop))predicate API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
444
1011
  @end
445
1012
  @interface NSSet<ObjectType> (NSSetCreation)
1013
+ + (instancetype)set;
1014
+ + (instancetype)setWithObject:(ObjectType)object;
1015
+ + (instancetype)setWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
1016
+ + (instancetype)setWithSet:(NSSet<ObjectType> *)set;
446
1017
  + (instancetype)setWithArray:(NSArray<ObjectType> *)array;
447
- @end
448
- @interface NSSet<ObjectType> (NSExtendedSet)
449
- - (BOOL)containsObject:(ObjectType)anObject;
450
- - (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)otherSet;
1018
+ - (instancetype)initWithSet:(NSSet<ObjectType> *)set;
1019
+ - (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag;
1020
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array;
451
1021
  @end
452
1022
  @interface NSMutableSet<ObjectType> : NSSet<ObjectType>
1023
+ - (void)addObject:(ObjectType)object;
1024
+ - (void)removeObject:(ObjectType)object;
1025
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1026
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1027
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
1028
+ @end
1029
+ @interface NSMutableSet<ObjectType> (NSExtendedMutableSet)
1030
+ - (void)addObjectsFromArray:(NSArray<ObjectType> *)array;
1031
+ - (void)intersectSet:(NSSet<ObjectType> *)otherSet;
1032
+ - (void)minusSet:(NSSet<ObjectType> *)otherSet;
453
1033
  - (void)removeAllObjects;
1034
+ - (void)unionSet:(NSSet<ObjectType> *)otherSet;
1035
+ - (void)setSet:(NSSet<ObjectType> *)otherSet;
1036
+ @end
1037
+ @interface NSMutableSet<ObjectType> (NSMutableSetCreation)
1038
+ + (instancetype)setWithCapacity:(NSUInteger)numItems;
1039
+ @end
1040
+ @interface NSCountedSet<ObjectType> : NSMutableSet<ObjectType>
1041
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
1042
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array;
1043
+ - (instancetype)initWithSet:(NSSet<ObjectType> *)set;
1044
+ - (NSUInteger)countForObject:(ObjectType)object;
1045
+ - (NSEnumerator<ObjectType> *)objectEnumerator;
454
1046
  - (void)addObject:(ObjectType)object;
455
1047
  - (void)removeObject:(ObjectType)object;
456
1048
  @end
1049
+ @interface NSSet<ObjectType> (NSSetVariadicCreation)
1050
+ + (instancetype)setWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
1051
+ - (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;
1052
+ @end
457
1053
  @interface NSOrderedSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
458
1054
  @end
459
1055
  @interface NSMutableOrderedSet<ObjectType> : NSOrderedSet<ObjectType>
460
1056
  @end
461
1057
  @interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
462
- @property (readonly, copy) NSArray<ObjectType> *allObjects;
463
1058
  - (nullable ObjectType)nextObject;
464
1059
  @end
1060
+ @interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
1061
+ @property (readonly, copy) NSArray<ObjectType> *allObjects;
1062
+ @end
465
1063
  @interface NSValue : NSObject <NSCopying, NSSecureCoding>
1064
+ - (void)getValue:(void *)value size:(NSUInteger)size API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
466
1065
  @property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
467
- @property (nullable, readonly) void *pointerValue;
468
- - (void)getValue:(void *)value;
1066
+ - (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
1067
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1068
+ @end
1069
+ @interface NSValue (NSValueCreation)
1070
+ + (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type;
1071
+ + (NSValue *)value:(const void *)value withObjCType:(const char *)type;
1072
+ @end
1073
+ @interface NSValue (NSValueExtensionMethods)
469
1074
  + (NSValue *)valueWithNonretainedObject:(nullable id)anObject;
1075
+ @property (nullable, readonly) id nonretainedObjectValue;
1076
+ + (NSValue *)valueWithPointer:(nullable const void *)pointer;
1077
+ @property (nullable, readonly) void *pointerValue;
1078
+ - (BOOL)isEqualToValue:(NSValue *)value;
470
1079
  @end
1080
+ NS_SWIFT_SENDABLE
471
1081
  @interface NSNumber : NSValue
472
- @property (readonly) NSUInteger unsignedIntegerValue __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
473
- @property (readonly) BOOL boolValue;
474
- - (NSComparisonResult)compare:(NSNumber *)otherNumber;
475
- - (BOOL)isEqualToNumber:(NSNumber *)number;
476
- @property (readonly, copy) NSString *stringValue;
477
- @property (readonly) NSInteger integerValue;
478
- @property (readonly) double doubleValue;
1082
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1083
+ - (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
1084
+ - (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
1085
+ - (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
1086
+ - (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
1087
+ - (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
1088
+ - (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
1089
+ - (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
1090
+ - (NSNumber *)initWithUnsignedLong:(unsigned long)value NS_DESIGNATED_INITIALIZER;
1091
+ - (NSNumber *)initWithLongLong:(long long)value NS_DESIGNATED_INITIALIZER;
1092
+ - (NSNumber *)initWithUnsignedLongLong:(unsigned long long)value NS_DESIGNATED_INITIALIZER;
1093
+ - (NSNumber *)initWithFloat:(float)value NS_DESIGNATED_INITIALIZER;
1094
+ - (NSNumber *)initWithDouble:(double)value NS_DESIGNATED_INITIALIZER;
1095
+ - (NSNumber *)initWithBool:(BOOL)value NS_DESIGNATED_INITIALIZER;
1096
+ - (NSNumber *)initWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1097
+ - (NSNumber *)initWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
479
1098
  @property (readonly) char charValue;
480
1099
  @property (readonly) unsigned char unsignedCharValue;
481
1100
  @property (readonly) short shortValue;
@@ -487,6 +1106,16 @@ __attribute__((swift_bridge("Swift.Set")))
487
1106
  @property (readonly) long long longLongValue;
488
1107
  @property (readonly) unsigned long long unsignedLongLongValue;
489
1108
  @property (readonly) float floatValue;
1109
+ @property (readonly) double doubleValue;
1110
+ @property (readonly) BOOL boolValue;
1111
+ @property (readonly) NSInteger integerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1112
+ @property (readonly) NSUInteger unsignedIntegerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1113
+ @property (readonly, copy) NSString *stringValue;
1114
+ - (NSComparisonResult)compare:(NSNumber *)otherNumber;
1115
+ - (BOOL)isEqualToNumber:(NSNumber *)number;
1116
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
1117
+ @end
1118
+ @interface NSNumber (NSNumberCreation)
490
1119
  + (NSNumber *)numberWithChar:(char)value;
491
1120
  + (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
492
1121
  + (NSNumber *)numberWithShort:(short)value;
@@ -500,124 +1129,409 @@ __attribute__((swift_bridge("Swift.Set")))
500
1129
  + (NSNumber *)numberWithFloat:(float)value;
501
1130
  + (NSNumber *)numberWithDouble:(double)value;
502
1131
  + (NSNumber *)numberWithBool:(BOOL)value;
503
- + (NSNumber *)numberWithInteger:(NSInteger)value;
504
- + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value;
505
- - (NSNumber *)initWithLongLong:(long long)value NS_DESIGNATED_INITIALIZER;
1132
+ + (NSNumber *)numberWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1133
+ + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1134
+ @end
1135
+ @interface NSValue (NSDeprecated)
1136
+ - (void)getValue:(void *)value API_DEPRECATED_WITH_REPLACEMENT("getValue:size:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
506
1137
  @end
507
1138
  __attribute__((swift_bridge("Decimal")))
508
1139
  @interface NSDecimalNumber : NSNumber
509
1140
  @end
1141
+ typedef NS_ENUM(NSUInteger, NSRoundingMode) {
1142
+ NSRoundPlain,
1143
+ NSRoundDown,
1144
+ NSRoundUp,
1145
+ NSRoundBankers
1146
+ } NS_SWIFT_NAME(NSDecimalNumber.RoundingMode);
1147
+ typedef NS_ENUM(NSUInteger, NSCalculationError) {
1148
+ NSCalculationNoError = 0,
1149
+ NSCalculationLossOfPrecision,
1150
+ NSCalculationUnderflow,
1151
+ NSCalculationOverflow,
1152
+ NSCalculationDivideByZero
1153
+ } NS_SWIFT_NAME(NSDecimalNumber.CalculationError);
1154
+ #define NSDecimalMaxSize (8)
1155
+ #define NSDecimalNoScale SHRT_MAX
1156
+ typedef struct NS_SWIFT_SENDABLE {
1157
+ signed int _exponent:8;
1158
+ unsigned int _length:4;
1159
+ unsigned int _isNegative:1;
1160
+ unsigned int _isCompact:1;
1161
+ unsigned int _reserved:18;
1162
+ unsigned short _mantissa[NSDecimalMaxSize];
1163
+ } NSDecimal NS_SWIFT_NAME(Decimal);
510
1164
  @interface NSNull : NSObject <NSCopying, NSSecureCoding>
511
1165
  + (NSNull *)null;
512
1166
  @end
513
1167
  typedef NS_OPTIONS(NSUInteger, NSDataReadingOptions) {
514
1168
  NSDataReadingMappedIfSafe = 1UL << 0,
515
1169
  NSDataReadingUncached = 1UL << 1,
516
- NSDataReadingMappedAlways = 1UL << 3,
517
- NSDataReadingMapped = NSDataReadingMappedIfSafe,
518
- NSMappedRead = NSDataReadingMapped,
519
- NSUncachedRead = NSDataReadingUncached
1170
+ NSDataReadingMappedAlways API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = 1UL << 3,
1171
+ NSDataReadingMapped API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingMappedIfSafe", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingMappedIfSafe,
1172
+ NSMappedRead API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingMapped", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingMapped,
1173
+ NSUncachedRead API_DEPRECATED_WITH_REPLACEMENT("NSDataReadingUncached", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataReadingUncached
520
1174
  };
521
1175
  typedef NS_OPTIONS(NSUInteger, NSDataWritingOptions) {
522
1176
  NSDataWritingAtomic = 1UL << 0,
523
- NSDataWritingWithoutOverwriting = 1UL << 1,
524
- NSDataWritingFileProtectionNone = 0x10000000,
525
- NSDataWritingFileProtectionComplete = 0x20000000,
526
- NSDataWritingFileProtectionCompleteUnlessOpen = 0x30000000,
527
- NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = 0x40000000,
528
- NSDataWritingFileProtectionCompleteWhenUserInactive = 0x50000000,
529
- NSDataWritingFileProtectionMask = 0xf0000000,
530
- NSAtomicWrite = NSDataWritingAtomic
1177
+ NSDataWritingWithoutOverwriting API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = 1UL << 1,
1178
+ NSDataWritingFileProtectionNone API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x10000000,
1179
+ NSDataWritingFileProtectionComplete API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x20000000,
1180
+ NSDataWritingFileProtectionCompleteUnlessOpen API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x30000000,
1181
+ NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x40000000,
1182
+ NSDataWritingFileProtectionCompleteWhenUserInactive API_AVAILABLE(ios(17.0), watchos(10.0), tvos(17.0)) API_UNAVAILABLE(macos) = 0x50000000,
1183
+ NSDataWritingFileProtectionMask API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0xf0000000,
1184
+ NSAtomicWrite API_DEPRECATED_WITH_REPLACEMENT("NSDataWritingAtomic", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) = NSDataWritingAtomic
531
1185
  };
532
1186
  typedef NS_OPTIONS(NSUInteger, NSDataSearchOptions) {
533
1187
  NSDataSearchBackwards = 1UL << 0,
534
1188
  NSDataSearchAnchored = 1UL << 1
535
- };
1189
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
536
1190
  typedef NS_OPTIONS(NSUInteger, NSDataBase64EncodingOptions) {
537
1191
  NSDataBase64Encoding64CharacterLineLength = 1UL << 0,
538
1192
  NSDataBase64Encoding76CharacterLineLength = 1UL << 1,
539
1193
  NSDataBase64EncodingEndLineWithCarriageReturn = 1UL << 4,
540
1194
  NSDataBase64EncodingEndLineWithLineFeed = 1UL << 5,
541
- } __attribute__((availability(ios,introduced=7.0)));
1195
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
542
1196
  typedef NS_OPTIONS(NSUInteger, NSDataBase64DecodingOptions) {
543
1197
  NSDataBase64DecodingIgnoreUnknownCharacters = 1UL << 0
544
- } __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1198
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
545
1199
  __attribute__((swift_bridge("Data")))
546
1200
  @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
1201
+ @property (readonly) NSUInteger length;
1202
+ @property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
1203
+ @end
1204
+ @interface NSData (NSExtendedData)
1205
+ @property (readonly, copy) NSString *description;
547
1206
  - (void)getBytes:(void *)buffer length:(NSUInteger)length;
1207
+ - (void)getBytes:(void *)buffer range:(NSRange)range;
548
1208
  - (BOOL)isEqualToData:(NSData *)other;
549
- - (nullable instancetype)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
550
- - (nullable instancetype)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1209
+ - (NSData *)subdataWithRange:(NSRange)range;
1210
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
1211
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically;
1212
+ - (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
551
1213
  - (BOOL)writeToURL:(NSURL *)url options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
552
- + (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
553
- + (nullable instancetype)dataWithContentsOfFile:(NSString *)path;
1214
+ - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1215
+ - (void) enumerateByteRangesUsingBlock:(void (NS_NOESCAPE ^)(const void *bytes, NSRange byteRange, BOOL *stop))block API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1216
+ @end
1217
+ @interface NSData (NSDataCreation)
554
1218
  + (instancetype)data;
555
- @property (readonly) NSUInteger length;
556
- @property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
557
1219
  + (instancetype)dataWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
1220
+ + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
558
1221
  + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
559
- - (NSData *)subdataWithRange:(NSRange)range;
560
- - (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
561
- - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange;
1222
+ + (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1223
+ + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1224
+ + (nullable instancetype)dataWithContentsOfFile:(NSString *)path;
1225
+ + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url;
1226
+ - (instancetype)initWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
1227
+ - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
1228
+ - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
1229
+ - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length deallocator:(nullable void (^)(void *bytes, NSUInteger length))deallocator API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1230
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1231
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1232
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path;
1233
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url;
1234
+ - (instancetype)initWithData:(NSData *)data;
1235
+ + (instancetype)dataWithData:(NSData *)data;
562
1236
  @end
563
- @interface NSData (NSExtendedData)
564
- - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
1237
+ @interface NSData (NSDataBase64Encoding)
1238
+ - (nullable instancetype)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1239
+ - (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1240
+ - (nullable instancetype)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1241
+ - (NSData *)base64EncodedDataWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
565
1242
  @end
566
1243
  @interface NSData (NSDeprecated)
567
1244
  - (NSString *)base64Encoding __attribute__((availability(macos,introduced=10.6,deprecated=10.9,message="Use base64EncodedStringWithOptions: instead"), availability(ios,introduced=4.0,deprecated=7.0,message="Use base64EncodedStringWithOptions: instead"), availability(watchos,introduced=2.0,deprecated=2.0,message="Use base64EncodedStringWithOptions: instead"), availability(tvos,introduced=9.0,deprecated=9.0,message="Use base64EncodedStringWithOptions: instead")));
568
1245
  @end
569
- @interface NSData (NSDataBase64Encoding)
570
- - (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
571
- @end
572
1246
  @interface NSMutableData : NSData
573
- - (nullable instancetype)initWithCapacity:(NSUInteger)capacity;
574
- - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
575
1247
  @property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
576
1248
  @property NSUInteger length;
577
- + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
578
- + (nullable instancetype)dataWithLength:(NSUInteger)length;
579
1249
  @end
580
1250
  @interface NSMutableData (NSExtendedMutableData)
1251
+ - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
581
1252
  - (void)appendData:(NSData *)other;
1253
+ - (void)increaseLengthBy:(NSUInteger)extraLength;
1254
+ - (void)replaceBytesInRange:(NSRange)range withBytes:(const void *)bytes;
1255
+ - (void)resetBytesInRange:(NSRange)range;
1256
+ - (void)setData:(NSData *)data;
1257
+ - (void)replaceBytesInRange:(NSRange)range withBytes:(nullable const void *)replacementBytes length:(NSUInteger)replacementLength;
1258
+ @end
1259
+ @interface NSMutableData (NSMutableDataCreation)
1260
+ + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
1261
+ + (nullable instancetype)dataWithLength:(NSUInteger)length;
1262
+ - (nullable instancetype)initWithCapacity:(NSUInteger)capacity;
1263
+ - (nullable instancetype)initWithLength:(NSUInteger)length;
582
1264
  @end
1265
+ NS_SWIFT_SENDABLE
583
1266
  __attribute__((swift_bridge("Date")))
584
1267
  @interface NSDate : NSObject <NSCopying, NSSecureCoding>
1268
+ @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate;
1269
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1270
+ - (instancetype)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti NS_DESIGNATED_INITIALIZER;
1271
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1272
+ @end
1273
+ @interface NSDate (NSExtendedDate)
1274
+ - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate;
1275
+ @property (readonly) NSTimeInterval timeIntervalSinceNow;
1276
+ @property (readonly) NSTimeInterval timeIntervalSince1970;
1277
+ - (id)addTimeInterval:(NSTimeInterval)seconds API_DEPRECATED("Use dateByAddingTimeInterval instead", macos(10.0,10.6), ios(2.0,4.0), watchos(2.0,2.0), tvos(9.0,9.0));
1278
+ - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
1279
+ - (NSDate *)earlierDate:(NSDate *)anotherDate;
585
1280
  - (NSDate *)laterDate:(NSDate *)anotherDate;
586
- + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs;
587
- + (instancetype)date;
588
1281
  - (NSComparisonResult)compare:(NSDate *)other;
589
- - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti __attribute__((availability(ios,introduced=2.0)));
590
- @property (readonly) NSTimeInterval timeIntervalSinceNow;
591
1282
  - (BOOL)isEqualToDate:(NSDate *)otherDate;
592
- @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate;
593
- @property (readonly) NSTimeInterval timeIntervalSince1970;
1283
+ @property (readonly, copy) NSString *description;
1284
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
594
1285
  @property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate;
595
- + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs;
1286
+ @end
1287
+ @interface NSDate (NSDateCreation)
1288
+ + (instancetype)date;
1289
+ + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs;
596
1290
  + (instancetype)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti;
1291
+ + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs;
1292
+ + (instancetype)dateWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date;
1293
+ @property (class, readonly, copy) NSDate *distantFuture;
1294
+ @property (class, readonly, copy) NSDate *distantPast;
1295
+ @property (class, readonly, copy) NSDate *now API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1296
+ - (instancetype)initWithTimeIntervalSinceNow:(NSTimeInterval)secs;
1297
+ - (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)secs;
1298
+ - (instancetype)initWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date;
597
1299
  @end
598
1300
  __attribute__((swift_bridge("DateComponents")))
599
1301
  @interface NSDateComponents : NSObject <NSCopying, NSSecureCoding>
1302
+ @property NSInteger year;
1303
+ @property NSInteger month;
1304
+ @property NSInteger day;
1305
+ @property NSInteger hour;
1306
+ @property NSInteger minute;
1307
+ @property NSInteger second;
600
1308
  @end
601
1309
  __attribute__((swift_bridge("DateInterval")))
602
1310
  @interface NSDateInterval : NSObject <NSCopying, NSSecureCoding>
603
1311
  @end
604
- typedef NSString * NSURLResourceKey NS_TYPED_EXTENSIBLE_ENUM;
605
- __attribute__((swift_bridge("URL")))
606
- @interface NSURL : NSObject <NSCopying, NSSecureCoding>
607
- - (BOOL)getResourceValue:(out id _Nullable * _Nonnull)value forKey:(NSURLResourceKey)key error:(out NSError ** _Nullable)error __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
608
- @property (nullable, readonly, copy) NSString *lastPathComponent __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
609
- - (nullable NSDictionary<NSURLResourceKey, id> *)resourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys error:(NSError **)error __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
610
- + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
611
- @property (readonly, getter=isFileURL) BOOL fileURL;
612
- - (BOOL)setResourceValue:(nullable id)value forKey:(NSURLResourceKey)key error:(NSError **)error __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
613
- @property (nullable, readonly, copy) NSString *pathExtension __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
614
- @property (nullable, readonly, copy) NSString *path;
615
- @property (nullable, readonly, copy) NSString *scheme;
616
- @property (nullable, readonly, copy) NSString *host;
617
- + (nullable instancetype)URLWithString:(NSString * _Nonnull)URLString;
618
- + (NSURL *)fileURLWithPath:(NSString *)path;
619
- - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent __attribute__((availability(ios,introduced=4.0)));
620
- @property (nullable, readonly, copy) NSString *absoluteString;
1312
+ typedef NSString * NSURLResourceKey NS_TYPED_EXTENSIBLE_ENUM;
1313
+ __attribute__((swift_bridge("URL")))
1314
+ NS_SWIFT_SENDABLE
1315
+ @interface NSURL: NSObject <NSSecureCoding, NSCopying>
1316
+ - (instancetype)initFileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1317
+ - (instancetype)initFileURLWithPath:(NSString *)path relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1318
+ - (instancetype)initFileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1319
+ - (instancetype)initFileURLWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
1320
+ + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL) isDir relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1321
+ + (NSURL *)fileURLWithPath:(NSString *)path relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1322
+ + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1323
+ + (NSURL *)fileURLWithPath:(NSString *)path;
1324
+ - (instancetype)initFileURLWithFileSystemRepresentation:(const char *)path isDirectory:(BOOL)isDir relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1325
+ + (NSURL *)fileURLWithFileSystemRepresentation:(const char *)path isDirectory:(BOOL) isDir relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1326
+ - (nullable instancetype)initWithString:(NSString *)URLString;
1327
+ - (nullable instancetype)initWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL NS_DESIGNATED_INITIALIZER;
1328
+ + (nullable instancetype)URLWithString:(NSString *)URLString;
1329
+ + (nullable instancetype)URLWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL;
1330
+ - (instancetype)initWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1331
+ + (NSURL *)URLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1332
+ - (instancetype)initAbsoluteURLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1333
+ + (NSURL *)absoluteURLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1334
+ @property (readonly, copy) NSData *dataRepresentation API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1335
+ @property (nullable, readonly, copy) NSString *absoluteString;
1336
+ @property (readonly, copy) NSString *relativeString;
1337
+ @property (nullable, readonly, copy) NSURL *baseURL;
1338
+ @property (nullable, readonly, copy) NSURL *absoluteURL;
1339
+ @property (nullable, readonly, copy) NSString *scheme;
1340
+ @property (nullable, readonly, copy) NSString *resourceSpecifier;
1341
+ @property (nullable, readonly, copy) NSString *host;
1342
+ @property (nullable, readonly, copy) NSNumber *port;
1343
+ @property (nullable, readonly, copy) NSString *user;
1344
+ @property (nullable, readonly, copy) NSString *password;
1345
+ @property (nullable, readonly, copy) NSString *path;
1346
+ @property (nullable, readonly, copy) NSString *fragment;
1347
+ @property (nullable, readonly, copy) NSString *parameterString API_DEPRECATED("The parameterString method is deprecated. Post deprecation for applications linked with or after the macOS 10.15, and for all iOS, watchOS, and tvOS applications, parameterString will always return nil, and the path method will return the complete path including the semicolon separator and params component if the URL string contains them.", macosx(10.2,10.15), ios(2.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1348
+ @property (nullable, readonly, copy) NSString *query;
1349
+ @property (nullable, readonly, copy) NSString *relativePath;
1350
+ @property (readonly) BOOL hasDirectoryPath API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1351
+ - (BOOL)getFileSystemRepresentation:(char *)buffer maxLength:(NSUInteger)maxBufferLength API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1352
+ @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1353
+ @property (readonly, getter=isFileURL) BOOL fileURL;
1354
+
1355
+ @property (nullable, readonly, copy) NSURL *standardizedURL;
1356
+ @property (nullable, readonly, copy) NSURL *filePathURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1357
+ - (BOOL)getResourceValue:(out id _Nullable * _Nonnull)value forKey:(NSURLResourceKey)key error:(out NSError ** _Nullable)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1358
+ - (nullable NSDictionary<NSURLResourceKey, id> *)resourceValuesForKeys:(NSArray<NSURLResourceKey> *)keys error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1359
+ - (BOOL)setResourceValue:(nullable id)value forKey:(NSURLResourceKey)key error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1360
+ - (BOOL)setResourceValues:(NSDictionary<NSURLResourceKey, id> *)keyedValues error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1361
+
1362
+ - (void)removeCachedResourceValueForKey:(NSURLResourceKey)key API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1363
+ - (void)removeAllCachedResourceValues API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1364
+ - (void)setTemporaryResourceValue:(nullable NS_SWIFT_SENDABLE id)value forKey:(NSURLResourceKey)key API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1365
+
1366
+
1367
+
1368
+
1369
+
1370
+
1371
+
1372
+
1373
+
1374
+
1375
+
1376
+
1377
+
1378
+
1379
+
1380
+
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+
1392
+
1393
+
1394
+
1395
+
1396
+
1397
+
1398
+
1399
+
1400
+
1401
+
1402
+
1403
+
1404
+
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+
1413
+
1414
+
1415
+
1416
+
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+
1423
+
1424
+
1425
+
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+
1438
+
1439
+
1440
+
1441
+
1442
+
1443
+
1444
+
1445
+
1446
+
1447
+
1448
+
1449
+
1450
+
1451
+
1452
+
1453
+
1454
+
1455
+
1456
+
1457
+
1458
+
1459
+
1460
+
1461
+
1462
+
1463
+
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+
1476
+
1477
+
1478
+
1479
+
1480
+
1481
+
1482
+
1483
+
1484
+
1485
+
1486
+
1487
+
1488
+
1489
+
1490
+
1491
+
1492
+
1493
+
1494
+
1495
+
1496
+
1497
+
1498
+
1499
+
1500
+
1501
+
1502
+
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+
1509
+
1510
+
1511
+
1512
+
1513
+
1514
+
1515
+
1516
+
1517
+
1518
+
1519
+ @end
1520
+ NS_SWIFT_SENDABLE
1521
+ API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
1522
+ @interface NSURL (NSURLPathUtilities)
1523
+ + (nullable NSURL *)fileURLWithPathComponents:(NSArray<NSString *> *)components API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1524
+ @property (nullable, readonly, copy) NSArray<NSString *> *pathComponents API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1525
+ @property (nullable, readonly, copy) NSString *lastPathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1526
+ @property (nullable, readonly, copy) NSString *pathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1527
+ - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1528
+ - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent isDirectory:(BOOL)isDirectory API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
1529
+ @property (nullable, readonly, copy) NSURL *URLByDeletingLastPathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1530
+ - (nullable NSURL *)URLByAppendingPathExtension:(NSString *)pathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1531
+ @property (nullable, readonly, copy) NSURL *URLByDeletingPathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1532
+ - (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error NS_SWIFT_NOTHROW API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1533
+ @property (nullable, readonly, copy) NSURL *URLByStandardizingPath API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1534
+ @property (nullable, readonly, copy) NSURL *URLByResolvingSymlinksInPath API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
621
1535
  @end
622
1536
  __attribute__((swift_bridge("URLComponents")))
623
1537
  @interface NSURLComponents : NSObject <NSCopying>
@@ -641,19 +1555,18 @@ typedef NS_ENUM(NSUInteger, NSURLRequestCachePolicy)
641
1555
 
642
1556
  NSURLRequestReloadRevalidatingCacheData = 5,
643
1557
  };
644
- typedef NS_ENUM(NSUInteger, NSURLCredentialPersistence) {
645
- NSURLCredentialPersistenceNone,
646
- NSURLCredentialPersistenceForSession,
647
- NSURLCredentialPersistencePermanent,
648
- NSURLCredentialPersistenceSynchronizable __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=6.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
649
- };
650
1558
  __attribute__((swift_bridge("URLRequest")))
651
1559
  @interface NSURLRequest : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
1560
+ + (instancetype)requestWithURL:(NSURL *)URL;
1561
+ + (instancetype)requestWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval;
1562
+ - (instancetype)initWithURL:(NSURL *)URL;
652
1563
  - (instancetype)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval NS_DESIGNATED_INITIALIZER;
653
1564
  @property (nullable, readonly, copy) NSURL *URL;
654
- + (instancetype _Nonnull)requestWithURL:(NSURL * _Nonnull)URL;
1565
+ @property (readonly) NSURLRequestCachePolicy cachePolicy;
1566
+ @property (readonly) NSTimeInterval timeoutInterval;
655
1567
  @end
656
1568
  @interface NSMutableURLRequest : NSURLRequest
1569
+ @property NSURLRequestCachePolicy cachePolicy;
657
1570
  @property (nullable, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields;
658
1571
  @property BOOL HTTPShouldUsePipelining __attribute__((availability(macos,introduced=10.7,deprecated=15.4,message="Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead"), availability(ios,introduced=4.0,deprecated=18.4,message="Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead"), availability(watchos,introduced=2.0,deprecated=11.4,message="Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead"), availability(tvos,introduced=9.0,deprecated=18.4,message="Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead"), availability(visionos,introduced=1.0,deprecated=2.4,message="Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead")));
659
1572
  @property BOOL HTTPShouldHandleCookies;
@@ -666,16 +1579,97 @@ __attribute__((swift_bridge("URLRequest")))
666
1579
  @end
667
1580
  NS_SWIFT_NAME(URLResponse)
668
1581
  @interface NSURLResponse : NSObject <NSCopying, NSSecureCoding>
1582
+ - (instancetype)initWithURL:(NSURL *)URL MIMEType:(nullable NSString *)MIMEType expectedContentLength:(NSInteger)length textEncodingName:(nullable NSString *)name;
1583
+ @property (nullable, readonly, copy) NSString *textEncodingName;
1584
+ @property (nullable, readonly, copy) NSString *suggestedFilename;
669
1585
  @property (readonly) long long expectedContentLength;
670
1586
  @property (nullable, readonly, copy) NSString *MIMEType;
671
1587
  @property (nullable, readonly, copy) NSURL *URL;
672
1588
  @end
673
1589
  NS_SWIFT_NAME(HTTPURLResponse)
674
1590
  @interface NSHTTPURLResponse : NSURLResponse
1591
+ + (NSString *)localizedStringForStatusCode:(NSInteger)statusCode;
1592
+ - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
675
1593
  - (nullable instancetype)initWithURL:(NSURL *)url statusCode:(NSInteger)statusCode HTTPVersion:(nullable NSString *)HTTPVersion headerFields:(nullable NSDictionary<NSString *, NSString *> *)headerFields __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=5.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
676
1594
  @property (readonly, copy) NSDictionary *allHeaderFields;
677
1595
  @property (readonly) NSInteger statusCode;
678
1596
  @end
1597
+
1598
+ typedef NSString * NSHTTPCookiePropertyKey NS_TYPED_EXTENSIBLE_ENUM;
1599
+ typedef NSString * NSHTTPCookieStringPolicy NS_TYPED_ENUM;
1600
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieName __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1601
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieValue __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1602
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieOriginURL __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1603
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieVersion __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1604
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieDomain __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1605
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookiePath __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1606
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieSecure __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1607
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieExpires __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1608
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieComment __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1609
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieCommentURL __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1610
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieDiscard __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1611
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieMaximumAge __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1612
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookiePort __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1613
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieSetByJavaScript __attribute__((availability(macos,introduced=15.2), availability(ios,introduced=18.2), availability(watchos,introduced=11.2), availability(tvos,introduced=18.2), availability(visionos,introduced=2.2)));
1614
+ FOUNDATION_EXPORT NSHTTPCookiePropertyKey const NSHTTPCookieSameSitePolicy __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0)));
1615
+ FOUNDATION_EXPORT NSHTTPCookieStringPolicy const NSHTTPCookieSameSiteLax __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0)));
1616
+ FOUNDATION_EXPORT NSHTTPCookieStringPolicy const NSHTTPCookieSameSiteStrict __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0)));
1617
+ @class NSHTTPCookieInternal;
1618
+ NS_SWIFT_SENDABLE
1619
+ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
1620
+ @interface NSHTTPCookie : NSObject
1621
+ {
1622
+ @private
1623
+ NSHTTPCookieInternal * _cookiePrivate;
1624
+ }
1625
+ - (nullable instancetype)initWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties;
1626
+ + (nullable NSHTTPCookie *)cookieWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties;
1627
+ + (NSDictionary<NSString *, NSString *> *)requestHeaderFieldsWithCookies:(NSArray<NSHTTPCookie *> *)cookies;
1628
+ + (NSArray<NSHTTPCookie *> *)cookiesWithResponseHeaderFields:(NSDictionary<NSString *, NSString *> *)headerFields forURL:(NSURL *)URL;
1629
+ @property (nullable, readonly, copy) NSDictionary<NSHTTPCookiePropertyKey, id> *properties;
1630
+ @property (readonly) NSUInteger version;
1631
+ @property (readonly, copy) NSString *name;
1632
+ @property (readonly, copy) NSString *value;
1633
+ @property (nullable, readonly, copy) NSDate *expiresDate;
1634
+ @property (readonly, getter=isSessionOnly) BOOL sessionOnly;
1635
+ @property (readonly, copy) NSString *domain;
1636
+ @property (readonly, copy) NSString *path;
1637
+ @property (readonly, getter=isSecure) BOOL secure;
1638
+ @property (readonly, getter=isHTTPOnly) BOOL HTTPOnly;
1639
+ @property (nullable, readonly, copy) NSString *comment;
1640
+ @property (nullable, readonly, copy) NSURL *commentURL;
1641
+ @property (nullable, readonly, copy) NSArray<NSNumber *> *portList;
1642
+ @property (nullable, readonly, copy) NSHTTPCookieStringPolicy sameSitePolicy __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0)));
1643
+ @end
1644
+
1645
+ typedef NS_ENUM(NSUInteger, NSHTTPCookieAcceptPolicy) {
1646
+ NSHTTPCookieAcceptPolicyAlways,
1647
+ NSHTTPCookieAcceptPolicyNever,
1648
+ NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
1649
+ };
1650
+ @class NSHTTPCookieStorageInternal, NSURLSessionTask, NSSortDescriptor;
1651
+ NS_SWIFT_SENDABLE
1652
+ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
1653
+ @interface NSHTTPCookieStorage : NSObject
1654
+ {
1655
+ @private
1656
+ NSHTTPCookieStorageInternal *_internal;
1657
+ }
1658
+ @property(class, readonly, strong) NSHTTPCookieStorage *sharedHTTPCookieStorage;
1659
+ + (NSHTTPCookieStorage *)sharedCookieStorageForGroupContainerIdentifier:(NSString *)identifier __attribute__((availability(macos,introduced=10.11), availability(ios,introduced=9.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1660
+ @property (nullable , readonly, copy) NSArray<NSHTTPCookie *> *cookies;
1661
+ - (void)setCookie:(NSHTTPCookie *)cookie;
1662
+ - (void)deleteCookie:(NSHTTPCookie *)cookie;
1663
+ - (void)removeCookiesSinceDate:(NSDate *)date __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1664
+ - (nullable NSArray<NSHTTPCookie *> *)cookiesForURL:(NSURL *)URL;
1665
+ - (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(nullable NSURL *)URL mainDocumentURL:(nullable NSURL *)mainDocumentURL;
1666
+ @property NSHTTPCookieAcceptPolicy cookieAcceptPolicy;
1667
+ - (NSArray<NSHTTPCookie *> *)sortedCookiesUsingDescriptors:(NSArray<NSSortDescriptor *> *) sortOrder __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=5.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1668
+ @end
1669
+ @interface NSHTTPCookieStorage (NSURLSessionTaskAdditions)
1670
+ - (void)storeCookies:(NSArray<NSHTTPCookie *> *)cookies forTask:(NSURLSessionTask *)task __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1671
+ - (void)getCookiesForTask:(NSURLSessionTask *)task completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSArray<NSHTTPCookie *> * _Nullable cookies))completionHandler __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1672
+ @end
679
1673
  NS_SWIFT_NAME(URLSessionDelegate)
680
1674
  @protocol NSURLSessionDelegate <NSObject>
681
1675
  @end
@@ -783,12 +1777,6 @@ NS_SWIFT_NAME(URLSessionConfiguration)
783
1777
  @property NSTimeInterval timeoutIntervalForRequest;
784
1778
  @property (class, readonly, strong) NSURLSessionConfiguration *defaultSessionConfiguration;
785
1779
  @end
786
- NS_SWIFT_NAME(URLCredential)
787
- typedef struct __attribute__((objc_bridge(id))) __SecTrust *SecTrustRef;
788
- @interface NSURLCredential : NSObject <NSSecureCoding, NSCopying>
789
- + (NSURLCredential *)credentialForTrust:(SecTrustRef)trust __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=3.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
790
- + (NSURLCredential *)credentialWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;
791
- @end
792
1780
  __attribute__((swift_bridge("UUID")))
793
1781
  @interface NSUUID : NSObject <NSCopying, NSSecureCoding>
794
1782
  + (instancetype)UUID;
@@ -812,29 +1800,212 @@ __attribute__((swift_bridge("CharacterSet")))
812
1800
  @property (readonly, copy) NSCharacterSet *invertedSet;
813
1801
  @end
814
1802
  FOUNDATION_EXPORT NSString * const NSUserActivityTypeBrowsingWeb;
815
- typedef NSString * NSLocaleKey NS_TYPED_EXTENSIBLE_ENUM;
1803
+ typedef NSString * NSLocaleKey NS_TYPED_ENUM;
816
1804
  __attribute__((swift_bridge("Locale")))
1805
+ NS_SWIFT_SENDABLE
817
1806
  @interface NSLocale : NSObject <NSCopying, NSSecureCoding>
818
1807
  - (nullable id)objectForKey:(NSLocaleKey)key;
819
- + (instancetype)localeWithLocaleIdentifier:(NSString *)ident __attribute__((availability(ios,introduced=4.0)));
820
- @property (readonly, copy) NSString *localeIdentifier;
821
- - (instancetype)initWithLocaleIdentifier:(NSString *)string NS_DESIGNATED_INITIALIZER;
822
- @property (class, readonly, copy) NSArray<NSString *> *preferredLanguages;
823
1808
  - (nullable NSString *)displayNameForKey:(NSLocaleKey)key value:(id)value;
1809
+ - (instancetype)initWithLocaleIdentifier:(NSString *)string NS_DESIGNATED_INITIALIZER;
1810
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1811
+ @end
1812
+ @interface NSLocale (NSExtendedLocale)
1813
+ @property (readonly, copy) NSString *localeIdentifier;
1814
+ - (NSString *)localizedStringForLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1815
+ @property (readonly, copy) NSString *languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1816
+ - (nullable NSString *)localizedStringForLanguageCode:(NSString *)languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1817
+ @property (readonly, copy) NSString *languageIdentifier API_AVAILABLE(macosx(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1818
+ @property (nullable, readonly, copy) NSString *countryCode API_DEPRECATED_WITH_REPLACEMENT("regionCode", macos(10.12, API_TO_BE_DEPRECATED), ios(10.0, API_TO_BE_DEPRECATED), watchos(3.0, API_TO_BE_DEPRECATED), tvos(10.0, API_TO_BE_DEPRECATED));
1819
+ - (nullable NSString *)localizedStringForCountryCode:(NSString *)countryCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1820
+ @property (nullable, readonly, copy) NSString *regionCode API_AVAILABLE(macosx(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1821
+ @property (nullable, readonly, copy) NSString *scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1822
+ - (nullable NSString *)localizedStringForScriptCode:(NSString *)scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1823
+ @property (nullable, readonly, copy) NSString *variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1824
+ - (nullable NSString *)localizedStringForVariantCode:(NSString *)variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1825
+ @property (readonly, copy) NSCharacterSet *exemplarCharacterSet API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1826
+ @property (readonly, copy) NSString *calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1827
+ - (nullable NSString *)localizedStringForCalendarIdentifier:(NSString *)calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1828
+ @property (nullable, readonly, copy) NSString *collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1829
+ - (nullable NSString *)localizedStringForCollationIdentifier:(NSString *)collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1830
+ @property (readonly) BOOL usesMetricSystem API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1831
+ @property (readonly, copy) NSString *decimalSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1832
+ @property (readonly, copy) NSString *groupingSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1833
+ @property (readonly, copy) NSString *currencySymbol API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1834
+ @property (nullable, readonly, copy) NSString *currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1835
+ - (nullable NSString *)localizedStringForCurrencyCode:(NSString *)currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1836
+ @property (readonly, copy) NSString *collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1837
+ - (nullable NSString *)localizedStringForCollatorIdentifier:(NSString *)collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1838
+ @property (readonly, copy) NSString *quotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1839
+ @property (readonly, copy) NSString *quotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1840
+ @property (readonly, copy) NSString *alternateQuotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1841
+ @property (readonly, copy) NSString *alternateQuotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
824
1842
  @end
825
1843
  @interface NSLocale (NSLocaleCreation)
826
- @property (class, readonly, copy) NSLocale *currentLocale;
1844
+ @property (class, readonly, strong) NSLocale *autoupdatingCurrentLocale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1845
+ @property (class, readonly, copy) NSLocale *currentLocale;
1846
+ @property (class, readonly, copy) NSLocale *systemLocale;
1847
+ + (instancetype)localeWithLocaleIdentifier:(NSString *)ident API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1848
+ - (instancetype)init NS_UNAVAILABLE;
1849
+ @end
1850
+ @interface NSLocale (NSLocaleGeneralInfo)
1851
+ @property (class, readonly, copy) NSArray<NSString *> *availableLocaleIdentifiers;
1852
+ @property (class, readonly, copy) NSArray<NSString *> *ISOLanguageCodes;
1853
+ @property (class, readonly, copy) NSArray<NSString *> *ISOCountryCodes;
1854
+ @property (class, readonly, copy) NSArray<NSString *> *ISOCurrencyCodes;
1855
+ @property (class, readonly, copy) NSArray<NSString *> *commonISOCurrencyCodes API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1856
+ @property (class, readonly, copy) NSArray<NSString *> *preferredLanguages API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1857
+ + (NSDictionary<NSString *, NSString *> *)componentsFromLocaleIdentifier:(NSString *)string;
1858
+ + (NSString *)localeIdentifierFromComponents:(NSDictionary<NSString *, NSString *> *)dict;
1859
+ + (NSString *)canonicalLocaleIdentifierFromString:(NSString *)string;
1860
+ + (NSString *)canonicalLanguageIdentifierFromString:(NSString *)string;
1861
+ + (nullable NSString *)localeIdentifierFromWindowsLocaleCode:(uint32_t)lcid API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1862
+ + (uint32_t)windowsLocaleCodeFromLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1863
+ typedef NS_ENUM(NSUInteger, NSLocaleLanguageDirection) {
1864
+ NSLocaleLanguageDirectionUnknown = kCFLocaleLanguageDirectionUnknown,
1865
+ NSLocaleLanguageDirectionLeftToRight = kCFLocaleLanguageDirectionLeftToRight,
1866
+ NSLocaleLanguageDirectionRightToLeft = kCFLocaleLanguageDirectionRightToLeft,
1867
+ NSLocaleLanguageDirectionTopToBottom = kCFLocaleLanguageDirectionTopToBottom,
1868
+ NSLocaleLanguageDirectionBottomToTop = kCFLocaleLanguageDirectionBottomToTop
1869
+ };
1870
+ + (NSLocaleLanguageDirection)characterDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1871
+ + (NSLocaleLanguageDirection)lineDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
827
1872
  @end
828
1873
  __attribute__((swift_bridge("TimeZone")))
829
1874
  @interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
1875
+ + (nullable instancetype)timeZoneWithName:(NSString *)tzName;
830
1876
  @property (class, readonly, copy) NSTimeZone *localTimeZone;
831
1877
  @property (nullable, readonly, copy) NSString *abbreviation;
832
1878
  + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
833
1879
  @end
1880
+ typedef NS_OPTIONS(NSUInteger, NSCalendarUnit) {
1881
+ /// Identifier for the era unit.
1882
+ ///
1883
+ /// The corresponding value is an `NSInteger`.
1884
+ NSCalendarUnitEra = kCFCalendarUnitEra,
1885
+ /// Identifier for the year unit.
1886
+ ///
1887
+ /// The corresponding value is an `NSInteger`.
1888
+ NSCalendarUnitYear = kCFCalendarUnitYear,
1889
+ /// Identifier for the month unit.
1890
+ ///
1891
+ /// The corresponding value is an `NSInteger`.
1892
+ NSCalendarUnitMonth = kCFCalendarUnitMonth,
1893
+ /// Identifier for the day unit.
1894
+ ///
1895
+ /// The corresponding value is an `NSInteger`.
1896
+ NSCalendarUnitDay = kCFCalendarUnitDay,
1897
+ /// Identifier for the hour unit.
1898
+ ///
1899
+ /// The corresponding value is an `NSInteger`.
1900
+ NSCalendarUnitHour = kCFCalendarUnitHour,
1901
+ /// Identifier for the minute unit.
1902
+ ///
1903
+ /// The corresponding value is an `NSInteger`.
1904
+ NSCalendarUnitMinute = kCFCalendarUnitMinute,
1905
+ /// Identifier for the second unit.
1906
+ ///
1907
+ /// The corresponding value is a `double`.
1908
+ NSCalendarUnitSecond = kCFCalendarUnitSecond,
1909
+ /// Identifier for the weekday unit.
1910
+ ///
1911
+ /// The corresponding value is an `NSInteger`. The weekday units are the numbers `1` through `N` (where for the Gregorian calendar `N`=`7` and `1` is Sunday).
1912
+ NSCalendarUnitWeekday = kCFCalendarUnitWeekday,
1913
+ /// Identifier for the ordinal weekday unit.
1914
+ ///
1915
+ /// The corresponding value is an `NSInteger`. The weekday ordinal unit describes ordinal position within the month unit of the corresponding weekday unit. For example, in the Gregorian calendar a weekday ordinal unit of `2` for a weekday unit `3` indicates "the second Tuesday in the month".
1916
+ NSCalendarUnitWeekdayOrdinal = kCFCalendarUnitWeekdayOrdinal,
1917
+ /// Identifier for the quarter of the calendar.
1918
+ ///
1919
+ /// The corresponding value is an `NSInteger`.
1920
+ ///
1921
+ /// > Important: The `NSCalendarUnitQuarter` unit is largely unimplemented, and is not recommended for use.
1922
+ NSCalendarUnitQuarter API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitQuarter,
1923
+ /// Identifier for the week of the month calendar unit.
1924
+ NSCalendarUnitWeekOfMonth API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitWeekOfMonth,
1925
+ /// Identifier for the week of the year calendar unit.
1926
+ NSCalendarUnitWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitWeekOfYear,
1927
+ /// Identifier for the week-counting year unit.
1928
+ NSCalendarUnitYearForWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitYearForWeekOfYear,
1929
+ /// Identifier for the nanosecond unit.
1930
+ NSCalendarUnitNanosecond API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = (1 << 15),
1931
+ NSCalendarUnitDayOfYear API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0)) = kCFCalendarUnitDayOfYear,
1932
+ /// Identifier for the calendar of a date components object.
1933
+ ///
1934
+ /// The corresponding value is an `NSCalendar`.
1935
+ NSCalendarUnitCalendar API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0)) = (1 << 20),
1936
+ /// Identifier for the time zone of a date components object.
1937
+ ///
1938
+ /// The corresponding value is an `NSTimeZone`.
1939
+ NSCalendarUnitTimeZone API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0)) = (1 << 21),
1940
+ NSCalendarUnitIsLeapMonth API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0)) = (1 << 30),
1941
+ NSCalendarUnitIsRepeatedDay API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0)) = (1UL << 31),
1942
+ #if !0
1943
+ /// Specifies the era unit.
1944
+ /// @deprecated Use `NSCalendarUnitEra` instead.
1945
+ NSEraCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitEra", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitEra,
1946
+ /// Specifies the year unit.
1947
+ /// @deprecated Use `NSCalendarUnitYear` instead.
1948
+ NSYearCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitYear", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitYear,
1949
+ /// Specifies the month unit.
1950
+ /// @deprecated Use `NSCalendarUnitMonth` instead.
1951
+ NSMonthCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitMonth", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitMonth,
1952
+ /// Specifies the day unit.
1953
+ /// @deprecated Use `NSCalendarUnitDay` instead.
1954
+ NSDayCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitDay", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitDay,
1955
+ /// Specifies the hour unit.
1956
+ /// @deprecated Use `NSCalendarUnitHour` instead.
1957
+ NSHourCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitHour", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitHour,
1958
+ /// Specifies the minute unit.
1959
+ /// @deprecated Use `NSCalendarUnitMinute` instead.
1960
+ NSMinuteCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitMinute", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitMinute,
1961
+ /// Specifies the second unit.
1962
+ /// @deprecated Use `NSCalendarUnitSecond` instead.
1963
+ NSSecondCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitSecond", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitSecond,
1964
+ /// Specifies the week unit.
1965
+ ///
1966
+ /// Equal to `kCFCalendarUnitWeek`.
1967
+ /// @deprecated Use `NSCalendarUnitWeekOfMonth` or `NSCalendarUnitWeekOfYear` instead.
1968
+ NSWeekCalendarUnit API_DEPRECATED("NSCalendarUnitWeekOfMonth or NSCalendarUnitWeekOfYear, depending on which you mean", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = kCFCalendarUnitWeek,
1969
+ /// Specifies the weekday unit.
1970
+ /// @deprecated Use `NSCalendarUnitWeekday` instead.
1971
+ NSWeekdayCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitWeekday", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitWeekday,
1972
+ /// Specifies the ordinal weekday unit.
1973
+ ///
1974
+ /// The weekday ordinal unit describes the ordinal position within the month of the corresponding weekday unit. For example, in the Gregorian calendar a weekday ordinal of 2 for a weekday of 3 indicates "the second Tuesday in the month". Equal to `kCFCalendarUnitWeekdayOrdinal`.
1975
+ /// @deprecated Use `NSCalendarUnitWeekdayOrdinal` instead.
1976
+ NSWeekdayOrdinalCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitWeekdayOrdinal", macos(10.4, 10.10), ios(2.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitWeekdayOrdinal,
1977
+ /// Specifies the quarter unit.
1978
+ /// @deprecated Use `NSCalendarUnitQuarter` instead.
1979
+ NSQuarterCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitQuarter", macos(10.6, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitQuarter,
1980
+ /// Specifies the week of the month calendar unit.
1981
+ /// @deprecated Use `NSCalendarUnitWeekOfMonth` instead.
1982
+ NSWeekOfMonthCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitWeekOfMonth", macos(10.7, 10.10), ios(5.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitWeekOfMonth,
1983
+ /// Specifies the week of the year calendar unit.
1984
+ /// @deprecated Use `NSCalendarUnitWeekOfYear` instead.
1985
+ NSWeekOfYearCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitWeekOfYear", macos(10.7, 10.10), ios(5.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitWeekOfYear,
1986
+ /// Specifies the year when the calendar is being interpreted as a week-based calendar.
1987
+ /// @deprecated Use `NSCalendarUnitYearForWeekOfYear` instead.
1988
+ NSYearForWeekOfYearCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitYearForWeekOfYear", macos(10.7, 10.10), ios(5.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitYearForWeekOfYear,
1989
+ /// Specifies the calendar of the calendar.
1990
+ /// @deprecated Use `NSCalendarUnitCalendar` instead.
1991
+ NSCalendarCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitCalendar", macos(10.7, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitCalendar,
1992
+ /// Specifies the time zone of the calendar as an `NSTimeZone`.
1993
+ /// @deprecated Use `NSCalendarUnitTimeZone` instead.
1994
+ NSTimeZoneCalendarUnit API_DEPRECATED_WITH_REPLACEMENT("NSCalendarUnitTimeZone", macos(10.7, 10.10), ios(4.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0)) = NSCalendarUnitTimeZone,
1995
+ #endif
1996
+ };
1997
+
1998
+ typedef NSString * NSCalendarIdentifier NS_TYPED_EXTENSIBLE_ENUM;
1999
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGregorian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
834
2000
  __attribute__((swift_bridge("Calendar")))
835
2001
  @interface NSCalendar : NSObject <NSCopying, NSSecureCoding>
2002
+ - (nullable id)initWithCalendarIdentifier:(NSCalendarIdentifier)ident NS_DESIGNATED_INITIALIZER;
2003
+ @property (copy) NSTimeZone *timeZone;
2004
+ - (NSDateComponents *)components:(NSCalendarUnit)unitFlags fromDate:(NSDate *)date;
836
2005
  @end
837
2006
  typedef NSString *NSNotificationName NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(NSNotification.Name);
2007
+ FOUNDATION_EXPORT NSNotificationName const NSHTTPCookieManagerAcceptPolicyChangedNotification __attribute__((availability(macos,introduced=10.2,deprecated=10.11,message="Notification is never posted"), availability(ios,introduced=2.0,deprecated=9.0,message="Notification is never posted"), availability(watchos,introduced=2.0,deprecated=2.0,message="Notification is never posted"), availability(tvos,introduced=9.0,deprecated=9.0,message="Notification is never posted"), availability(visionos,introduced=1.0,deprecated=1.0,message="Notification is never posted")));
2008
+ FOUNDATION_EXPORT NSNotificationName const NSHTTPCookieManagerCookiesChangedNotification __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
838
2009
  __attribute__((swift_bridge("Notification")))
839
2010
  @interface NSNotification : NSObject <NSCopying, NSCoding>
840
2011
  @property (nullable, readonly, retain) id object;
@@ -851,21 +2022,6 @@ NS_SWIFT_NAME(NotificationCenter)
851
2022
  - (void)removeObserver:(id)observer;
852
2023
  @end
853
2024
  typedef NSString *NSErrorDomain;
854
- typedef NSString *NSFileAttributeKey NS_TYPED_EXTENSIBLE_ENUM;
855
- typedef NSString *NSFileAttributeType NS_TYPED_ENUM;
856
- FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeSymbolicLink;
857
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileType;
858
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileSize;
859
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileCreationDate;
860
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileModificationDate;
861
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileProtectionKey __attribute__((availability(ios,introduced=4.0)));
862
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemSize;
863
- FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeSize;
864
- typedef NSString *NSFileProtectionType NS_TYPED_ENUM;
865
- FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionNone __attribute__((availability(ios,introduced=4.0)));
866
- FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionComplete __attribute__((availability(ios,introduced=4.0)));
867
- FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUnlessOpen __attribute__((availability(ios,introduced=5.0)));
868
- FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUntilFirstUserAuthentication __attribute__((availability(ios,introduced=5.0)));
869
2025
  typedef NSString *NSErrorUserInfoKey;
870
2026
  FOUNDATION_EXPORT NSErrorDomain const NSCocoaErrorDomain;
871
2027
  NS_ERROR_ENUM(NSCocoaErrorDomain) {
@@ -888,17 +2044,54 @@ __attribute__((swift_bridge("Swift.Error")))
888
2044
  @property (readonly) NSInteger code;
889
2045
  @property (readonly, copy) NSDictionary<NSErrorUserInfoKey, id> *userInfo;
890
2046
  @property (readonly, copy) NSString *localizedDescription;
2047
+ @property (nullable, readonly, copy) NSString *localizedFailureReason;
2048
+ @property (nullable, readonly, copy) NSString *localizedRecoverySuggestion;
2049
+ @property (nullable, readonly, copy) NSArray<NSString *> *localizedRecoveryOptions;
2050
+ @property (nullable, readonly, strong) id recoveryAttempter;
2051
+ @property (nullable, readonly, copy) NSString *helpAnchor;
2052
+ + (void)setUserInfoValueProviderForDomain:(NSErrorDomain)errorDomain provider:(id _Nullable (NS_SWIFT_SENDABLE ^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))provider NS_SWIFT_NAME(NSError.setUserInfoValueProvider(forDomain:provider:));
2053
+ + (id _Nullable (NS_SWIFT_SENDABLE ^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))userInfoValueProviderForDomain:(NSErrorDomain)errorDomain;
891
2054
  @end
892
2055
  typedef NSString *NSExceptionName NS_TYPED_EXTENSIBLE_ENUM;
2056
+ FOUNDATION_EXPORT NSExceptionName const NSGenericException;
2057
+ FOUNDATION_EXPORT NSExceptionName const NSRangeException;
893
2058
  FOUNDATION_EXPORT NSExceptionName const NSInvalidArgumentException;
894
- @interface NSException : NSObject <NSCopying, NSSecureCoding>
2059
+ FOUNDATION_EXPORT NSExceptionName const NSInternalInconsistencyException;
2060
+ FOUNDATION_EXPORT NSExceptionName const NSMallocException;
2061
+ FOUNDATION_EXPORT NSExceptionName const NSObjectInaccessibleException;
2062
+ FOUNDATION_EXPORT NSExceptionName const NSObjectNotAvailableException;
2063
+ FOUNDATION_EXPORT NSExceptionName const NSDestinationInvalidException;
2064
+ FOUNDATION_EXPORT NSExceptionName const NSPortTimeoutException;
2065
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidSendPortException;
2066
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidReceivePortException;
2067
+ FOUNDATION_EXPORT NSExceptionName const NSPortSendException;
2068
+ FOUNDATION_EXPORT NSExceptionName const NSPortReceiveException;
2069
+ FOUNDATION_EXPORT NSExceptionName const NSOldStyleException;
2070
+ FOUNDATION_EXPORT NSExceptionName const NSInconsistentArchiveException;
2071
+ FOUNDATION_EXPORT NSExceptionName const NSCharacterConversionException;
2072
+ FOUNDATION_EXPORT NSExceptionName const NSParseErrorException; // raised by -propertyList
2073
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidArchiveOperationException;
2074
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidUnarchiveOperationException;
2075
+ __attribute__((__objc_exception__))
2076
+ @interface NSException : NSObject <NSCopying, NSSecureCoding> {
2077
+ @private
2078
+ NSString *name;
2079
+ NSString *reason;
2080
+ NSDictionary *userInfo;
2081
+ id reserved;
2082
+ }
2083
+ + (NSException *)exceptionWithName:(NSExceptionName)name reason:(nullable NSString *)reason userInfo:(nullable NSDictionary *)userInfo;
2084
+ - (instancetype)initWithName:(NSExceptionName)aName reason:(nullable NSString *)aReason userInfo:(nullable NSDictionary *)aUserInfo NS_DESIGNATED_INITIALIZER;
895
2085
  @property (readonly, copy) NSExceptionName name;
896
- @property (nullable, readonly, copy) NSDictionary *userInfo;
897
2086
  @property (nullable, readonly, copy) NSString *reason;
898
- + (NSException *)exceptionWithName:(NSExceptionName)name reason:(nullable NSString *)reason userInfo:(nullable NSDictionary *)userInfo;
899
- @property (readonly, copy) NSArray<NSString *> *callStackSymbols __attribute__((availability(ios,introduced=4.0)));
2087
+ @property (nullable, readonly, copy) NSDictionary *userInfo;
900
2088
  @property (readonly, copy) NSArray<NSNumber *> *callStackReturnAddresses __attribute__((availability(ios,introduced=2.0)));
901
- - (instancetype)initWithName:(NSExceptionName)aName reason:(nullable NSString *)aReason userInfo:(nullable NSDictionary *)aUserInfo NS_DESIGNATED_INITIALIZER;
2089
+ @property (readonly, copy) NSArray<NSString *> *callStackSymbols __attribute__((availability(ios,introduced=4.0)));
2090
+ - (void)raise;
2091
+ @end
2092
+ @interface NSException (NSExceptionRaisingConveniences)
2093
+ + (void)raise:(NSExceptionName)name format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3);
2094
+ + (void)raise:(NSExceptionName)name format:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(2,0);
902
2095
  @end
903
2096
  FOUNDATION_EXPORT NSUncaughtExceptionHandler * _Nullable NSGetUncaughtExceptionHandler(void);
904
2097
  FOUNDATION_EXPORT void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler * _Nullable);
@@ -921,7 +2114,21 @@ FOUNDATION_EXPORT void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler
921
2114
  #endif
922
2115
  #define NSCParameterAssert(condition) NSCAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)
923
2116
  #define NSParameterAssert(condition) NSAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)
2117
+ @interface NSObject (_NSCFTypeID)
2118
+ @property (readonly) CFTypeID _cfTypeID;
2119
+ @end
2120
+ @interface NSObject (NSCoderMethods)
2121
+ @property (readonly) Class classForCoder;
2122
+ @end
2123
+ @interface NSObject (NSKeyedArchiverObjectSubstitution)
2124
+ @property (nullable, readonly) Class classForKeyedArchiver;
2125
+ + (NSArray<NSString *> *)classFallbacksForKeyedArchiver;
2126
+ @end
2127
+ @interface NSObject (NSKeyedUnarchiverObjectSubstitution)
2128
+ + (Class)classForKeyedUnarchiver;
2129
+ @end
924
2130
  @interface NSObject (NSKeyValueCoding)
2131
+ - (nullable id)valueForKey:(NSString *)key;
925
2132
  - (void)setValue:(nullable id)value forKey:(NSString *)key;
926
2133
  @end
927
2134
  NS_SWIFT_NAME(Bundle)
@@ -947,7 +2154,6 @@ NS_SWIFT_NAME(UserDefaults)
947
2154
  @interface NSUserDefaults : NSObject
948
2155
  @property (class, readonly, strong) NSUserDefaults *standardUserDefaults;
949
2156
  @end
950
- NS_SWIFT_NAME(OperationQueue)
951
2157
  typedef NS_ENUM(NSInteger, NSOperationQueuePriority) {
952
2158
  NSOperationQueuePriorityVeryLow = -8L,
953
2159
  NSOperationQueuePriorityLow = -4L,
@@ -1047,23 +2253,8 @@ typedef NS_OPTIONS(NSUInteger, NSSearchPathDomainMask) {
1047
2253
  NSAllDomainsMask = 0x0ffff
1048
2254
  };
1049
2255
  FOUNDATION_EXPORT NSString *NSHomeDirectory(void);
2256
+ FOUNDATION_EXPORT NSString *NSTemporaryDirectory(void);
1050
2257
  FOUNDATION_EXPORT NSArray<NSString *> *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde);
1051
- NS_SWIFT_NAME(FileManager)
1052
- typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
1053
- NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1UL << 0,
1054
-
1055
- NSDirectoryEnumerationSkipsPackageDescendants = 1UL << 1,
1056
-
1057
- NSDirectoryEnumerationSkipsHiddenFiles = 1UL << 2,
1058
-
1059
- /* NSDirectoryEnumerationIncludesDirectoriesPostOrder causes the NSDirectoryEnumerator to enumerate each directory a second time after all of its contained files have been enumerated. Use NSDirectoryEnumerator.isEnumeratingDirectoryPostOrder to differentiate a post-order enumerated directory from a pre-order one.
1060
- */
1061
- NSDirectoryEnumerationIncludesDirectoriesPostOrder __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0))) = 1UL << 3,
1062
-
1063
- /* NSDirectoryEnumerationProducesRelativePathURLs causes the NSDirectoryEnumerator to always produce file path URLs relative to the directoryURL. This can reduce the size of each URL object returned during enumeration.
1064
- */
1065
- NSDirectoryEnumerationProducesRelativePathURLs __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0))) = 1UL << 4,
1066
- } __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1067
2258
  typedef NSString * NSKeyValueChangeKey NS_TYPED_ENUM;
1068
2259
  FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeKindKey;
1069
2260
  FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeNewKey;
@@ -1072,81 +2263,718 @@ FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeIndexesKey;
1072
2263
  FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeNotificationIsPriorKey __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1073
2264
  typedef NS_OPTIONS(NSUInteger, NSKeyValueObservingOptions) {
1074
2265
 
1075
- NSKeyValueObservingOptionNew = 0x01,
2266
+ NSKeyValueObservingOptionNew = 0x01,
2267
+
2268
+ NSKeyValueObservingOptionOld = 0x02,
2269
+
2270
+ /*
2271
+ The change dictionary in the notification will always contain an NSKeyValueChangeNewKey entry if NSKeyValueObservingOptionNew is also specified but will never contain an NSKeyValueChangeOldKey entry. (In an initial notification the current value of the observed property may be old, but it's new to the observer.) You can use this option instead of explicitly invoking, at the same time, code that is also invoked by the observer's -observeValueForKeyPath:ofObject:change:context: method. When this option is used with -addObserver:toObjectsAtIndexes:forKeyPath:options:context: a notification will be sent for each indexed object to which the observer is being added.
2272
+ */
2273
+ NSKeyValueObservingOptionInitial __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = 0x04,
2274
+
2275
+ /*
2276
+ The change dictionary in a notification sent before a change always contains an NSKeyValueChangeNotificationIsPriorKey entry whose value is [NSNumber numberWithBool:YES], but never contains an NSKeyValueChangeNewKey entry. You can use this option when the observer's own KVO-compliance requires it to invoke one of the -willChange... methods for one of its own properties, and the value of that property depends on the value of the observed object's property. (In that situation it's too late to easily invoke -willChange... properly in response to receiving an -observeValueForKeyPath:ofObject:change:context: message after the change.)
2277
+
2278
+ When this option is specified, the change dictionary in a notification sent after a change contains the same entries that it would contain if this option were not specified, except for ordered unique to-many relationships represented by NSOrderedSets. For those, for NSKeyValueChangeInsertion and NSKeyValueChangeReplacement changes, the change dictionary for a will-change notification contains an NSKeyValueChangeIndexesKey (and NSKeyValueChangeOldKey in the case of Replacement where the NSKeyValueObservingOptionOld option was specified at registration time) which give the indexes (and objects) which *may* be changed by the operation. The second notification, after the change, contains entries reporting what did actually change. For NSKeyValueChangeRemoval changes, removals by index are precise.
2279
+ */
2280
+ NSKeyValueObservingOptionPrior __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = 0x08
2281
+
2282
+ };
2283
+ typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
2284
+ NSKeyValueChangeSetting = 1,
2285
+ NSKeyValueChangeInsertion = 2,
2286
+ NSKeyValueChangeRemoval = 3,
2287
+ NSKeyValueChangeReplacement = 4,
2288
+ };
2289
+
2290
+ @class NSArray<ObjectType>, NSData, NSDate, NSDirectoryEnumerator<ObjectType>, NSError, NSNumber, NSFileProviderService, NSXPCConnection, NSLock, NSFileVersion;
2291
+ @protocol NSFileManagerDelegate;
2292
+ typedef NSString * NSFileAttributeKey NS_TYPED_EXTENSIBLE_ENUM;
2293
+ typedef NSString * NSFileAttributeType NS_TYPED_ENUM;
2294
+ typedef NSString * NSFileProtectionType NS_TYPED_ENUM;
2295
+ typedef NSString * NSFileProviderServiceName NS_TYPED_EXTENSIBLE_ENUM;
2296
+
2297
+
2298
+ typedef NS_OPTIONS(NSUInteger, NSVolumeEnumerationOptions) {
2299
+ NSVolumeEnumerationSkipHiddenVolumes = 1UL << 1,
2300
+ NSVolumeEnumerationProduceFileReferenceURLs = 1UL << 2
2301
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2302
+ typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
2303
+ NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1UL << 0,
2304
+ NSDirectoryEnumerationSkipsPackageDescendants = 1UL << 1,
2305
+ NSDirectoryEnumerationSkipsHiddenFiles = 1UL << 2,
2306
+ NSDirectoryEnumerationIncludesDirectoriesPostOrder API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) = 1UL << 3,
2307
+ NSDirectoryEnumerationProducesRelativePathURLs API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) = 1UL << 4,
2308
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2309
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerItemReplacementOptions) {
2310
+ NSFileManagerItemReplacementUsingNewMetadataOnly = 1UL << 0,
2311
+ NSFileManagerItemReplacementWithoutDeletingBackupItem = 1UL << 1
2312
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2313
+ typedef NS_ENUM(NSInteger, NSURLRelationship) {
2314
+ NSURLRelationshipContains,
2315
+ NSURLRelationshipSame,
2316
+ NSURLRelationshipOther
2317
+ } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2318
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerUnmountOptions) {
2319
+ NSFileManagerUnmountAllPartitionsAndEjectDisk = 1UL << 0,
2320
+ NSFileManagerUnmountWithoutUI = 1UL << 1,
2321
+ } API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios, watchos, tvos);
2322
+ FOUNDATION_EXPORT NSString *const NSFileManagerUnmountDissentingProcessIdentifierErrorKey API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios, watchos, tvos);
2323
+ extern NSNotificationName const NSUbiquityIdentityDidChangeNotification API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2324
+ @interface NSFileManager : NSObject
2325
+ @property (class, readonly, strong) NSFileManager *defaultManager;
2326
+ - (nullable NSArray<NSURL *> *)mountedVolumeURLsIncludingResourceValuesForKeys:(nullable NSArray<NSURLResourceKey> *)propertyKeys options:(NSVolumeEnumerationOptions)options API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2327
+ - (void)unmountVolumeAtURL:(NSURL *)url options:(NSFileManagerUnmountOptions)mask completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable errorOrNil))completionHandler API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios, watchos, tvos);
2328
+ - (nullable NSArray<NSURL *> *)contentsOfDirectoryAtURL:(NSURL *)url includingPropertiesForKeys:(nullable NSArray<NSURLResourceKey> *)keys options:(NSDirectoryEnumerationOptions)mask error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2329
+ - (NSArray<NSURL *> *)URLsForDirectory:(NSSearchPathDirectory)directory inDomains:(NSSearchPathDomainMask)domainMask API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2330
+ - (nullable NSURL *)URLForDirectory:(NSSearchPathDirectory)directory inDomain:(NSSearchPathDomainMask)domain appropriateForURL:(nullable NSURL *)url create:(BOOL)shouldCreate error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2331
+ - (BOOL)getRelationship:(NSURLRelationship *)outRelationship ofDirectoryAtURL:(NSURL *)directoryURL toItemAtURL:(NSURL *)otherURL error:(NSError **)error API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2332
+ - (BOOL)getRelationship:(NSURLRelationship *)outRelationship ofDirectory:(NSSearchPathDirectory)directory inDomain:(NSSearchPathDomainMask)domainMask toItemAtURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2333
+ - (BOOL)createDirectoryAtURL:(NSURL *)url withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2334
+ - (BOOL)createSymbolicLinkAtURL:(NSURL *)url withDestinationURL:(NSURL *)destURL error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2335
+ @property (nullable, assign) id <NSFileManagerDelegate> delegate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2336
+ - (BOOL)setAttributes:(NSDictionary<NSFileAttributeKey, id> *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2337
+ - (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2338
+ - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2339
+ - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2340
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2341
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2342
+ - (BOOL)createSymbolicLinkAtPath:(NSString *)path withDestinationPath:(NSString *)destPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2343
+ - (nullable NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2344
+ - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2345
+ - (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2346
+ - (BOOL)linkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2347
+ - (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2348
+ - (BOOL)copyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2349
+ - (BOOL)moveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2350
+ - (BOOL)linkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2351
+ - (BOOL)removeItemAtURL:(NSURL *)URL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2352
+ - (BOOL)trashItemAtURL:(NSURL *)url resultingItemURL:(NSURL * _Nullable * _Nullable)outResultingURL error:(NSError **)error API_AVAILABLE(macos(10.8), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
2353
+ - (nullable NSDictionary *)fileAttributesAtPath:(NSString *)path traverseLink:(BOOL)yorn API_DEPRECATED("Use -attributesOfItemAtPath:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2354
+ - (BOOL)changeFileAttributes:(NSDictionary *)attributes atPath:(NSString *)path API_DEPRECATED("Use -setAttributes:ofItemAtPath:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2355
+ - (nullable NSArray *)directoryContentsAtPath:(NSString *)path API_DEPRECATED("Use -contentsOfDirectoryAtPath:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2356
+ - (nullable NSDictionary *)fileSystemAttributesAtPath:(NSString *)path API_DEPRECATED("Use -attributesOfFileSystemForPath:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2357
+ - (nullable NSString *)pathContentOfSymbolicLinkAtPath:(NSString *)path API_DEPRECATED("Use -destinationOfSymbolicLinkAtPath:error:", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2358
+ - (BOOL)createSymbolicLinkAtPath:(NSString *)path pathContent:(NSString *)otherpath API_DEPRECATED("Use -createSymbolicLinkAtPath:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2359
+ - (BOOL)createDirectoryAtPath:(NSString *)path attributes:(NSDictionary *)attributes API_DEPRECATED("Use -createDirectoryAtPath:withIntermediateDirectories:attributes:error: instead", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2360
+ #if TARGET_OS_OSX || TARGET_OS_MACCATALYST
2361
+ - (BOOL)linkPath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2362
+ - (BOOL)copyPath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2363
+ - (BOOL)movePath:(NSString *)src toPath:(NSString *)dest handler:(nullable id)handler API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2364
+ - (BOOL)removeFileAtPath:(NSString *)path handler:(nullable id)handler API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2365
+ #endif
2366
+ @property (readonly, copy) NSString *currentDirectoryPath;
2367
+ - (BOOL)changeCurrentDirectoryPath:(NSString *)path;
2368
+ - (BOOL)fileExistsAtPath:(NSString *)path;
2369
+ - (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory;
2370
+ - (BOOL)isReadableFileAtPath:(NSString *)path;
2371
+ - (BOOL)isWritableFileAtPath:(NSString *)path;
2372
+ - (BOOL)isExecutableFileAtPath:(NSString *)path;
2373
+ - (BOOL)isDeletableFileAtPath:(NSString *)path;
2374
+ - (BOOL)contentsEqualAtPath:(NSString *)path1 andPath:(NSString *)path2;
2375
+ - (NSString *)displayNameAtPath:(NSString *)path;
2376
+ - (nullable NSArray<NSString *> *)componentsToDisplayForPath:(NSString *)path;
2377
+ - (nullable NSDirectoryEnumerator<NSString *> *)enumeratorAtPath:(NSString *)path;
2378
+ - (nullable NSDirectoryEnumerator<NSURL *> *)enumeratorAtURL:(NSURL *)url includingPropertiesForKeys:(nullable NSArray<NSURLResourceKey> *)keys options:(NSDirectoryEnumerationOptions)mask errorHandler:(nullable BOOL (^)(NSURL *url, NSError *error))handler API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2379
+ - (nullable NSArray<NSString *> *)subpathsAtPath:(NSString *)path;
2380
+ - (nullable NSData *)contentsAtPath:(NSString *)path;
2381
+ - (BOOL)createFileAtPath:(NSString *)path contents:(nullable NSData *)data attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attr;
2382
+ - (const char *)fileSystemRepresentationWithPath:(NSString *)path NS_RETURNS_INNER_POINTER;
2383
+ - (NSString *)stringWithFileSystemRepresentation:(const char *)str length:(NSUInteger)len;
2384
+ - (BOOL)replaceItemAtURL:(NSURL *)originalItemURL withItemAtURL:(NSURL *)newItemURL backupItemName:(nullable NSString *)backupItemName options:(NSFileManagerItemReplacementOptions)options resultingItemURL:(NSURL * _Nullable * _Nullable)resultingURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2385
+ - (BOOL)setUbiquitous:(BOOL)flag itemAtURL:(NSURL *)url destinationURL:(NSURL *)destinationURL error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2386
+ - (BOOL)isUbiquitousItemAtURL:(NSURL *)url API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2387
+ - (BOOL)startDownloadingUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2388
+ - (BOOL)evictUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2389
+ - (nullable NSURL *)URLForUbiquityContainerIdentifier:(nullable NSString *)containerIdentifier API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2390
+ - (nullable NSURL *)URLForPublishingUbiquitousItemAtURL:(NSURL *)url expirationDate:(NSDate * _Nullable * _Nullable)outDate error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2391
+ @property (nullable, readonly, copy) id<NSObject,NSCopying,NSCoding> ubiquityIdentityToken API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2392
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerSupportedSyncControls) {
2393
+ NSFileManagerSupportedSyncControlsPauseSync = 1 << 0,
2394
+ NSFileManagerSupportedSyncControlsFailUploadOnConflict = 1 << 1,
2395
+ } API_AVAILABLE(ios(26.0), macos(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2396
+ - (void)pauseSyncForUbiquitousItemAtURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))completionHandler API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2397
+ typedef NS_ENUM(NSInteger, NSFileManagerResumeSyncBehavior) {
2398
+ NSFileManagerResumeSyncBehaviorPreserveLocalChanges = 0,
2399
+ NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict = 1,
2400
+ NSFileManagerResumeSyncBehaviorDropLocalChanges = 2,
2401
+ } API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2402
+ - (void)resumeSyncForUbiquitousItemAtURL:(NSURL *)url withBehavior:(NSFileManagerResumeSyncBehavior)behavior completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))completionHandler API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2403
+ - (void)fetchLatestRemoteVersionOfItemAtURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSFileVersion * _Nullable latestRemoteVersion, NSError * _Nullable error))completionHandler API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2404
+ typedef NS_ENUM(NSInteger, NSFileManagerUploadLocalVersionConflictPolicy) {
2405
+ NSFileManagerUploadConflictPolicyDefault = 0,
2406
+ NSFileManagerUploadConflictPolicyFailOnConflict = 1,
2407
+ } API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2408
+ - (void)uploadLocalVersionOfUbiquitousItemAtURL:(NSURL *)url withConflictResolutionPolicy:(NSFileManagerUploadLocalVersionConflictPolicy)conflictResolutionPolicy completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSFileVersion * _Nullable uploadedVersion, NSError * _Nullable error))completionHandler API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2409
+ - (void)getFileProviderServicesForItemAtURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSDictionary <NSFileProviderServiceName, NSFileProviderService *> * _Nullable services, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
2410
+ - (nullable NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier API_AVAILABLE(macos(10.8), ios(7.0), watchos(2.0), tvos(9.0));
2411
+ @end
2412
+ @interface NSFileManager (NSUserInformation)
2413
+ @property (readonly, copy) NSURL *homeDirectoryForCurrentUser API_AVAILABLE(macosx(10.12)) API_UNAVAILABLE(ios, watchos, tvos);
2414
+ @property (readonly, copy) NSURL *temporaryDirectory API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
2415
+ - (nullable NSURL *)homeDirectoryForUser:(NSString *)userName API_AVAILABLE(macosx(10.12)) API_UNAVAILABLE(ios, watchos, tvos);
2416
+ @end
2417
+ @interface NSObject (NSCopyLinkMoveHandler)
2418
+ - (BOOL)fileManager:(NSFileManager *)fm shouldProceedAfterError:(NSDictionary *)errorInfo API_DEPRECATED(" Handler API no longer supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2419
+ - (void)fileManager:(NSFileManager *)fm willProcessPath:(NSString *)path API_DEPRECATED("Handler API no longer supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2420
+ @end
2421
+ @protocol NSFileManagerDelegate <NSObject>
2422
+ @optional
2423
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2424
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2425
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error copyingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2426
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error copyingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2427
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2428
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2429
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2430
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2431
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2432
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2433
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error linkingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2434
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error linkingItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2435
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtPath:(NSString *)path;
2436
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtURL:(NSURL *)URL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2437
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtPath:(NSString *)path;
2438
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtURL:(NSURL *)URL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2439
+ @end
2440
+ @interface NSDirectoryEnumerator<ObjectType> : NSEnumerator<ObjectType>
2441
+ @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *fileAttributes;
2442
+ @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *directoryAttributes;
2443
+ @property (readonly) BOOL isEnumeratingDirectoryPostOrder API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2444
+ - (void)skipDescendents;
2445
+ @property (readonly) NSUInteger level API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2446
+ - (void)skipDescendants API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2447
+ @end
2448
+ API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(watchos, tvos)
2449
+ @interface NSFileProviderService : NSObject {
2450
+ @private
2451
+ NSFileProviderServiceName _name;
2452
+ id _endpointCreatingProxy;
2453
+ dispatch_group_t _requestFinishedGroup;
2454
+ }
2455
+ - (void)getFileProviderConnectionWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSXPCConnection * _Nullable connection, NSError * _Nullable error))completionHandler;
2456
+ @property (readonly, copy) NSFileProviderServiceName name;
2457
+ @end
2458
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileType;
2459
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeDirectory;
2460
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeRegular;
2461
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeSymbolicLink;
2462
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeSocket;
2463
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeCharacterSpecial;
2464
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeBlockSpecial;
2465
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeUnknown;
2466
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSize;
2467
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileModificationDate;
2468
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileReferenceCount;
2469
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileDeviceIdentifier;
2470
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileOwnerAccountName;
2471
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileGroupOwnerAccountName;
2472
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFilePosixPermissions;
2473
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemNumber;
2474
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFileNumber;
2475
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileExtensionHidden;
2476
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileHFSCreatorCode;
2477
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileHFSTypeCode;
2478
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileImmutable;
2479
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileAppendOnly;
2480
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileCreationDate;
2481
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileOwnerAccountID;
2482
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileGroupOwnerAccountID;
2483
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileBusy;
2484
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileProtectionKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2485
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionNone API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2486
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionComplete API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2487
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUnlessOpen API_AVAILABLE(macos(10.6), ios(5.0), watchos(2.0), tvos(9.0));
2488
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUntilFirstUserAuthentication API_AVAILABLE(macos(10.6), ios(5.0), watchos(2.0), tvos(9.0));
2489
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteWhenUserInactive API_AVAILABLE(ios(17.0), watchos(10.0), tvos(17.0)) API_UNAVAILABLE(macos);
2490
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemSize;
2491
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeSize;
2492
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemNodes;
2493
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeNodes;
2494
+ @interface NSDictionary<KeyType, ObjectType> (NSFileAttributes)
2495
+ - (unsigned long long)fileSize;
2496
+ - (nullable NSDate *)fileModificationDate;
2497
+ - (nullable NSString *)fileType;
2498
+ - (NSUInteger)filePosixPermissions;
2499
+ - (nullable NSString *)fileOwnerAccountName;
2500
+ - (nullable NSString *)fileGroupOwnerAccountName;
2501
+ - (NSInteger)fileSystemNumber;
2502
+ - (NSUInteger)fileSystemFileNumber;
2503
+ - (BOOL)fileExtensionHidden;
2504
+ - (OSType)fileHFSCreatorCode;
2505
+ - (OSType)fileHFSTypeCode;
2506
+ - (BOOL)fileIsImmutable;
2507
+ - (BOOL)fileIsAppendOnly;
2508
+ - (nullable NSDate *)fileCreationDate;
2509
+ - (nullable NSNumber *)fileOwnerAccountID;
2510
+ - (nullable NSNumber *)fileGroupOwnerAccountID;
2511
+ @end
2512
+
2513
+ NS_SWIFT_NAME(FileHandle)
2514
+ @interface NSFileHandle : NSObject <NSSecureCoding>
2515
+ + (nullable instancetype)fileHandleForWritingToURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2516
+ + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path;
2517
+ @property (readonly) int fileDescriptor;
2518
+ - (BOOL)writeData:(NSData *)data error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2519
+ - (BOOL)getOffset:(out unsigned long long *)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2520
+ - (BOOL)seekToEndReturningOffset:(out unsigned long long *_Nullable)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2521
+ - (BOOL)synchronizeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
2522
+ - (BOOL)closeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
2523
+ - (void)writeData:(NSData *)data __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeData:error:")));
2524
+ @property (readonly) unsigned long long offsetInFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getOffset:error:")));
2525
+ - (unsigned long long)seekToEndOfFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:")));
2526
+ - (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
2527
+ - (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
2528
+ @end
2529
+ NS_SWIFT_NAME(ProcessInfo)
2530
+ @interface NSProcessInfo : NSObject
2531
+ @property (readonly, copy) NSString *globallyUniqueString;
2532
+ @property (readonly) NSUInteger activeProcessorCount __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2533
+ @property (readonly) unsigned long long physicalMemory __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2534
+ @property (class, readonly, strong) NSProcessInfo *processInfo;
2535
+ @property (copy) NSString *processName;
2536
+ @property (readonly) int processIdentifier;
2537
+ @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
2538
+ @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
2539
+ @end
2540
+ @interface NSProcessInfo (NSProcessInfoPlatform)
2541
+ @property (readonly, getter=isiOSAppOnMac) BOOL iOSAppOnMac __attribute__((availability(macos,introduced=11.0), availability(ios,introduced=14.0), availability(watchos,introduced=7.0), availability(tvos,introduced=14.0)));
2542
+ @end
2543
+ typedef NS_ENUM(NSInteger, NSDecodingFailurePolicy) {
2544
+ /// A failure policy that directs the coder to raise an exception.
2545
+ ///
2546
+ /// With this policy, the `NSCoder` raises an exception internally to propagate failure messages (and unwind the stack). This exception can be transformed into an `NSError` via any of the TopLevel decode APIs.
2547
+ NSDecodingFailurePolicyRaiseException,
2548
+
2549
+ /// A failure policy that directs the coder to capture the failure as an error object.
2550
+ ///
2551
+ /// On decode failure, the `NSCoder` will capture the failure as an `NSError`, and prevent further decodes (by returning `0` / `nil` equivalent as appropriate). Use this policy if you know that all encoded objects use `failWithError:` to communicate decode failures and don't raise exceptions for error propagation.
2552
+ NSDecodingFailurePolicySetErrorAndReturn,
2553
+ } API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
2554
+ @interface NSCoder : NSObject
2555
+
2556
+ /// Encodes a value of the given type at the given address.
2557
+ ///
2558
+ /// Subclasses must override this method, and match it with a subsequent ``decodeValueOfObjCType:at:size:`` message.
2559
+ /// When calling this method, `type` must contain exactly one type code.
2560
+ /// You should not use this method to encode Objective-C objects.
2561
+ - (void)encodeValueOfObjCType:(const char *)type at:(const void *)addr;
2562
+
2563
+ /// Encodes a given data object.
2564
+ ///
2565
+ /// Subclasses must override this method. This method must be matched by a subsequent ``decodeDataObject`` message.
2566
+ - (void)encodeDataObject:(NSData *)data;
2567
+
2568
+ /// Decodes and returns an `NSData` object that was previously encoded with ``encodeDataObject:``.
2569
+ ///
2570
+ /// Subclasses must override this method.
2571
+ - (nullable NSData *)decodeDataObject;
2572
+
2573
+ /// Decodes a single value of a known type from the specified data buffer.
2574
+ ///
2575
+ /// The `type` parameter must contain exactly one type code, and the buffer specified by `data` must be large enough to hold the value corresponding to that type code.
2576
+ /// Subclasses must override this method and provide an implementation to decode the value.
2577
+ /// This method matches an ``encodeValueOfObjCType:at:`` message used during encoding.
2578
+ - (void)decodeValueOfObjCType:(const char *)type at:(void *)data size:(NSUInteger)size API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
2579
+
2580
+ /// This method is present for historical reasons and is not used with keyed archivers.
2581
+ ///
2582
+ /// - Returns: The version in effect for the class named `className` or `NSNotFound` if no class named `className` exists.
2583
+ - (NSInteger)versionForClassName:(NSString *)className;
2584
+ @end
2585
+ @interface NSCoder (NSExtendedCoder)
2586
+
2587
+ /// Encodes an object.
2588
+ ///
2589
+ /// `NSCoder`'s implementation simply invokes ``encodeValueOfObjCType:at:`` to encode `object`. Subclasses can override this method to encode a reference to `object` instead of `object` itself.
2590
+ /// This method must be matched by a subsequent ``decodeObject`` message.
2591
+ - (void)encodeObject:(nullable id)object;
2592
+
2593
+ /// An encoding method for subclasses to override to encode an interconnected group of objects, starting with the provided root object.
2594
+ ///
2595
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a subsequent ``decodeObject`` message.
2596
+ - (void)encodeRootObject:(id)rootObject;
2597
+
2598
+ /// An encoding method for subclasses to override such that it creates a copy, rather than a proxy, when decoded.
2599
+ ///
2600
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a corresponding ``decodeObject`` message.
2601
+ - (void)encodeBycopyObject:(nullable id)anObject;
2602
+
2603
+ /// An encoding method for subclasses to override such that it creates a proxy, rather than a copy, when decoded.
2604
+ ///
2605
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a corresponding ``decodeObject`` message.
2606
+ - (void)encodeByrefObject:(nullable id)anObject;
2607
+
2608
+ /// An encoding method for subclasses to override to conditionally encode an object, preserving common references to it.
2609
+ ///
2610
+ /// In the overriding method, `object` should be encoded only if it's unconditionally encoded elsewhere (with any other `encode...Object:` method).
2611
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``.
2612
+ /// This method must be matched by a subsequent ``decodeObject`` message.
2613
+ - (void)encodeConditionalObject:(nullable id)object;
2614
+
2615
+ /// Encodes a series of values of potentially differing Objective-C types.
2616
+ ///
2617
+ /// `types` is a C string containing any number of type codes. The variable arguments consist of one or more pointer arguments, each of which specifies a buffer containing the value to be encoded.
2618
+ /// This method must be matched by a subsequent ``decodeValuesOfObjCTypes:`` message.
2619
+ /// You should not use this method to encode Objective-C objects.
2620
+ - (void)encodeValuesOfObjCTypes:(const char *)types, ...;
2621
+
2622
+ /// Encodes an array of the given Objective-C type, provided the number of items and a pointer.
2623
+ ///
2624
+ /// The values are encoded from the buffer beginning at `array`. `type` must contain exactly one type code.
2625
+ /// This method must be matched by a subsequent ``decodeArrayOfObjCType:count:at:`` message.
2626
+ /// You should not use this method to encode C arrays of Objective-C objects.
2627
+ - (void)encodeArrayOfObjCType:(const char *)type count:(NSUInteger)count at:(const void *)array;
2628
+
2629
+ /// Encodes a buffer of data of an unspecified type.
2630
+ ///
2631
+ /// The buffer to be encoded begins at `byteaddr`, and its length in bytes is given by `length`.
2632
+ /// This method must be matched by a corresponding ``decodeBytesWithReturnedLength:`` message.
2633
+ - (void)encodeBytes:(nullable const void *)byteaddr length:(NSUInteger)length;
2634
+
2635
+ /// Decodes and returns a previously-encoded object.
2636
+ ///
2637
+ /// `NSCoder`'s implementation invokes ``decodeValueOfObjCType:at:size:`` to decode the object data.
2638
+ /// Subclasses may need to override this method if they override any of the corresponding `encode...Object` methods.
2639
+ - (nullable id)decodeObject;
2640
+
2641
+ /// Decodes a previously-encoded object, returning an error if decoding fails.
2642
+ - (nullable id)decodeTopLevelObjectAndReturnError:(NSError **)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_SWIFT_UNAVAILABLE("Use 'decodeTopLevelObject() throws' instead");
2643
+
2644
+ /// Decodes a series of potentially different Objective-C types.
2645
+ ///
2646
+ /// `types` is a single C string containing any number of type codes. The variable arguments consist of one or more pointer arguments, each of which specifies the buffer in which to place a single decoded value.
2647
+ /// This method matches an ``encodeValuesOfObjCTypes:`` message used during encoding.
2648
+ /// You should not use this method to decode Objective-C objects.
2649
+ - (void)decodeValuesOfObjCTypes:(const char *)types, ...;
2650
+
2651
+ /// Decodes an array of `count` items, whose Objective-C type is given by `itemType`.
2652
+ ///
2653
+ /// The items are decoded into the buffer beginning at `array`, which must be large enough to contain them all. `itemType` must contain exactly one type code.
2654
+ /// This method matches an ``encodeArrayOfObjCType:count:at:`` message used during encoding.
2655
+ /// You should not use this method to decode C arrays of Objective-C objects.
2656
+ - (void)decodeArrayOfObjCType:(const char *)itemType count:(NSUInteger)count at:(void *)array;
2657
+
2658
+ /// Decodes a buffer of data whose types are unspecified.
2659
+ ///
2660
+ /// The buffer's length is returned by reference in `lengthp`. If you need the bytes beyond the scope of the current `@autoreleasepool` block, you must copy them.
2661
+ /// This method matches an ``encodeBytes:length:`` message used during encoding.
2662
+
2663
+ #if TARGET_OS_OSX
2664
+ /// Encodes a property list.
2665
+ ///
2666
+ /// `NSCoder`'s implementation invokes ``encodeValueOfObjCType:at:`` to encode the property list.
2667
+ /// This method must be matched by a subsequent ``decodePropertyList`` message.
2668
+ - (void)encodePropertyList:(id)aPropertyList;
2669
+
2670
+ /// Decodes a property list that was previously encoded with ``encodePropertyList:``.
2671
+ - (nullable id)decodePropertyList;
2672
+ #endif
2673
+
2674
+ /// This method is present for historical reasons and has no effect.
2675
+
2676
+ /// This method is present for historical reasons and has no effect.
2677
+ ///
2678
+ /// `NSCoder`'s implementation returns the default memory zone, as given by `NSDefaultMallocZone()`.
2679
+
2680
+ /// The system version in effect for the archive.
2681
+ ///
2682
+ /// During encoding, the current version. During decoding, the version that was in effect when the data was encoded.
2683
+ /// Subclasses that implement decoding must override this property to return the system version of the data being decoded.
2684
+ @property (readonly) unsigned int systemVersion;
2685
+
2686
+ /// A Boolean value that indicates whether the receiver supports keyed coding of objects.
2687
+ ///
2688
+ /// `NO` by default. Concrete subclasses that support keyed coding, such as `NSKeyedArchiver`, need to override this property to return `YES`.
2689
+ @property (readonly) BOOL allowsKeyedCoding;
2690
+
2691
+ /// Encodes an object and associates it with the string key.
2692
+ ///
2693
+ /// Subclasses must override this method to identify multiple encodings of `object` and encode a reference to `object` instead.
2694
+ - (void)encodeObject:(nullable id)object forKey:(NSString *)key;
2695
+
2696
+ /// An encoding method for subclasses to override to conditionally encode an object, preserving common references to it, only if it has been unconditionally encoded.
2697
+ ///
2698
+ /// Subclasses must override this method if they support keyed coding.
2699
+ - (void)encodeConditionalObject:(nullable id)object forKey:(NSString *)key;
2700
+
2701
+ /// Encodes a Boolean value and associates it with the string `key`.
2702
+ ///
2703
+ /// Subclasses must override this method if they perform keyed coding.
2704
+ - (void)encodeBool:(BOOL)value forKey:(NSString *)key;
2705
+
2706
+ /// Encodes a C integer value and associates it with the string key.
2707
+ ///
2708
+ /// Subclasses must override this method if they perform keyed coding.
2709
+ - (void)encodeInt:(int)value forKey:(NSString *)key;
2710
+
2711
+ /// Encodes a 32-bit integer value and associates it with the string key.
2712
+ ///
2713
+ /// Subclasses must override this method if they perform keyed coding.
2714
+ - (void)encodeInt32:(int32_t)value forKey:(NSString *)key;
2715
+
2716
+ /// Encodes a 64-bit integer value and associates it with the string key.
2717
+ ///
2718
+ /// Subclasses must override this method if they perform keyed coding.
2719
+ - (void)encodeInt64:(int64_t)value forKey:(NSString *)key;
2720
+
2721
+ /// Encodes a floating point value and associates it with the string key.
2722
+ ///
2723
+ /// Subclasses must override this method if they perform keyed coding.
2724
+ - (void)encodeFloat:(float)value forKey:(NSString *)key;
2725
+
2726
+ /// Encodes a double-precision floating point value and associates it with the string key.
2727
+ ///
2728
+ /// Subclasses must override this method if they perform keyed coding.
2729
+ - (void)encodeDouble:(double)value forKey:(NSString *)key;
2730
+
2731
+ /// Encodes a buffer of data, given its length and a pointer, and associates it with a string key.
2732
+ ///
2733
+ /// Subclasses must override this method if they perform keyed coding.
2734
+ - (void)encodeBytes:(nullable const uint8_t *)bytes length:(NSUInteger)length forKey:(NSString *)key;
2735
+
2736
+ /// Returns a Boolean value that indicates whether an encoded value is available for a string.
2737
+ ///
2738
+ /// Subclasses must override this method if they perform keyed coding.
2739
+ - (BOOL)containsValueForKey:(NSString *)key;
2740
+
2741
+ /// Decodes and returns a previously-encoded object that was associated with the string `key`.
2742
+ ///
2743
+ /// Subclasses must override this method if they perform keyed coding.
2744
+ - (nullable id)decodeObjectForKey:(NSString *)key;
2745
+
2746
+ /// Decodes and returns a previously-encoded object for the given key, returning an error if decoding fails.
2747
+ - (nullable id)decodeTopLevelObjectForKey:(NSString *)key error:(NSError **)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_SWIFT_UNAVAILABLE("Use 'decodeObject(of:, forKey:)' instead");
2748
+
2749
+ /// Decodes and returns a boolean value that was previously encoded and associated with the string `key`.
2750
+ ///
2751
+ /// Subclasses must override this method if they perform keyed coding.
2752
+ - (BOOL)decodeBoolForKey:(NSString *)key;
2753
+
2754
+ /// Decodes and returns an int value that was previously encoded and associated with the string `key`.
2755
+ ///
2756
+ /// If the encoded integer does not fit into the default integer size, the method raises an `NSRangeException`. Subclasses must override this method if they perform keyed coding.
2757
+ - (int)decodeIntForKey:(NSString *)key;
2758
+
2759
+ /// Decodes and returns a 32-bit integer value that was previously encoded and associated with the string `key`.
2760
+ ///
2761
+ /// If the encoded integer does not fit into a 32-bit integer, the method raises an `NSRangeException`. Subclasses must override this method if they perform keyed coding.
2762
+ - (int32_t)decodeInt32ForKey:(NSString *)key;
2763
+
2764
+ /// Decodes and returns a 64-bit integer value that was previously encoded and associated with the string `key`.
2765
+ ///
2766
+ /// Subclasses must override this method if they perform keyed coding.
2767
+ - (int64_t)decodeInt64ForKey:(NSString *)key;
2768
+
2769
+ /// Decodes and returns a float value that was previously encoded and associated with the string `key`.
2770
+ ///
2771
+ /// If the value was encoded as a double, the extra precision is lost. Subclasses must override this method if they perform keyed coding.
2772
+ - (float)decodeFloatForKey:(NSString *)key;
2773
+
2774
+ /// Decodes and returns a double value that was previously encoded and associated with the string `key`.
2775
+ ///
2776
+ /// Subclasses must override this method if they perform keyed coding.
2777
+ - (double)decodeDoubleForKey:(NSString *)key;
2778
+
2779
+ /// Decodes a buffer of data that was previously encoded with ``encodeBytes:length:forKey:`` and associated with the string `key`.
2780
+ ///
2781
+ /// The buffer's length is returned by reference in `lengthp`. The returned bytes are immutable. Subclasses must override this method if they perform keyed coding.
2782
+ - (nullable const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(nullable NSUInteger *)lengthp NS_RETURNS_INNER_POINTER; // returned bytes immutable!
2783
+
2784
+ /// Decode bytes from the decoder. The length of the bytes must be greater than or equal to the `length` parameter.
2785
+ /// If the result exists, but is of insufficient length, then the decoder uses `failWithError` to fail the entire decode operation. The result of that is configurable on a per-NSCoder basis using `NSDecodingFailurePolicy`.
2786
+
2787
+ /// Decode bytes from the decoder for a given key. The length of the bytes must be greater than or equal to the `length` parameter.
2788
+ /// If the result exists, but is of insufficient length, then the decoder uses `failWithError` to fail the entire decode operation. The result of that is configurable on a per-NSCoder basis using `NSDecodingFailurePolicy`.
2789
+
2790
+ /// Encodes an integer value and associates it with the string key.
2791
+ ///
2792
+ /// Subclasses must override this method if they perform keyed coding.
2793
+ - (void)encodeInteger:(NSInteger)value forKey:(NSString *)key API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2794
+
2795
+ /// Decodes and returns an NSInteger value that was previously encoded and associated with the string `key`.
2796
+ ///
2797
+ /// If the encoded integer does not fit into the NSInteger size, the method raises an `NSRangeException`. Subclasses must override this method if they perform keyed coding.
2798
+ - (NSInteger)decodeIntegerForKey:(NSString *)key API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2799
+
2800
+ /// Indicates whether the archiver requires all archived classes to resist object substitution attacks.
2801
+ ///
2802
+ /// Secure coders check a set of allowed classes before decoding objects, and all objects must implement `NSSecureCoding`.
2803
+ // Returns YES if this coder requires secure coding. Secure coders check a list of allowed classes before decoding objects, and all objects must implement NSSecureCoding.
2804
+ @property (readonly) BOOL requiresSecureCoding API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2805
+
2806
+ /// Decodes an object for the key, restricted to the specified class.
2807
+ ///
2808
+ /// If the coder requires secure coding, then an exception will be thrown if the class to be decoded does not implement `NSSecureCoding` or is not `isKindOfClass:` of the argument.
2809
+ /// If the coder does not require secure coding, then the class argument is ignored.
2810
+ // Specify what the expected class of the allocated object is. If the coder responds YES to -requiresSecureCoding, then an exception will be thrown if the class to be decoded does not implement NSSecureCoding or is not isKindOfClass: of the argument. If the coder responds NO to -requiresSecureCoding, then the class argument is ignored and no check of the class of the decoded object is performed, exactly as if decodeObjectForKey: had been called.
2811
+ - (nullable id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2812
+
2813
+ /// Decodes an object for the key and restricted class, returning an error if decoding fails.
2814
+ - (nullable id)decodeTopLevelObjectOfClass:(Class)aClass forKey:(NSString *)key error:(NSError **)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_SWIFT_UNAVAILABLE("Use 'decodeObject(of:, forKey:)' instead");
2815
+
2816
+ /**
2817
+ Decodes the \c NSArray object for the given \c key, which should be an \c NSArray<cls>, containing the given non-collection class (no nested arrays or arrays of dictionaries, etc) from the coder.
2818
+
2819
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2820
+
2821
+ Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
2822
+ */
2823
+
2824
+ /**
2825
+ Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary<keyCls,objectCls> , with keys of type given in \c keyCls and objects of the given non-collection class \c objectCls (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the coder.
2826
+
2827
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2828
+
2829
+ Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
2830
+ */
2831
+
2832
+ /// Decodes an object for the key, restricted to the specified classes.
2833
+ ///
2834
+ /// The class of the object may be any class in the provided `NSSet`, or a subclass of any class in the set.
2835
+ // The class of the object may be any class in the provided NSSet, or a subclass of any class in the set. Otherwise, the behavior is the same as -decodeObjectOfClass:forKey:.
2836
+ - (nullable id)decodeObjectOfClasses:(nullable NSSet<Class> *)classes forKey:(NSString *)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) NS_REFINED_FOR_SWIFT;
2837
+
2838
+ /// Decodes an object for the key and restricted classes, returning an error if decoding fails.
2839
+ - (nullable id)decodeTopLevelObjectOfClasses:(nullable NSSet<Class> *)classes forKey:(NSString *)key error:(NSError **)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0)) NS_SWIFT_UNAVAILABLE("Use 'decodeObject(of:, forKey:)' instead");
2840
+
2841
+ /**
2842
+ Decodes the \c NSArray object for the given \c key, which should be an \c NSArray, containing the given non-collection classes (no nested arrays or arrays of dictionaries, etc) from the coder.
2843
+
2844
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2845
+
2846
+ Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
2847
+ */
2848
+
2849
+ /**
2850
+ Decodes the \c NSDictionary object for the given \c key, which should be an \c NSDictionary, with keys of the types given in \c keyClasses and objects of the given non-collection classes in \c objectClasses (no nested dictionaries or other dictionaries contained in the dictionary, etc) from the given coder.
2851
+
2852
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2853
+
2854
+ Returns \c nil if the object for \c key is not of the expected types, or cannot be decoded, and sets the \c error on the decoder.
2855
+ */
2856
+
2857
+ /// Returns a decoded property list for the specified key.
2858
+ ///
2859
+ /// This method calls ``decodeObjectOfClasses:forKey:`` with a set allowing only property list types.
2860
+ // Calls -decodeObjectOfClasses:forKey: with a set allowing only property list types.
2861
+ - (nullable id)decodePropertyListForKey:(NSString *)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2862
+
2863
+ /// The set of coded classes allowed for secure coding.
2864
+ ///
2865
+ /// Secure coders check this set of allowed classes before decoding objects, and all objects must implement `NSSecureCoding`.
2866
+ // Get the current set of allowed classes.
2867
+ @property (nullable, readonly, copy) NSSet<Class> *allowedClasses API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
1076
2868
 
1077
- NSKeyValueObservingOptionOld = 0x02,
2869
+ /*
2870
+ Typically, you would want to call this method in your -initWithCoder: implementation when you detect situations like:
2871
+ - lack of secure coding
2872
+ - corruption of your data
2873
+ - domain validation failures
1078
2874
 
1079
- /*
1080
- The change dictionary in the notification will always contain an NSKeyValueChangeNewKey entry if NSKeyValueObservingOptionNew is also specified but will never contain an NSKeyValueChangeOldKey entry. (In an initial notification the current value of the observed property may be old, but it's new to the observer.) You can use this option instead of explicitly invoking, at the same time, code that is also invoked by the observer's -observeValueForKeyPath:ofObject:change:context: method. When this option is used with -addObserver:toObjectsAtIndexes:forKeyPath:options:context: a notification will be sent for each indexed object to which the observer is being added.
1081
- */
1082
- NSKeyValueObservingOptionInitial __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = 0x04,
2875
+ After calling -failWithError: within your -initWithCoder: implementation, you should clean up and return nil as early as possible.
1083
2876
 
1084
- /*
1085
- The change dictionary in a notification sent before a change always contains an NSKeyValueChangeNotificationIsPriorKey entry whose value is [NSNumber numberWithBool:YES], but never contains an NSKeyValueChangeNewKey entry. You can use this option when the observer's own KVO-compliance requires it to invoke one of the -willChange... methods for one of its own properties, and the value of that property depends on the value of the observed object's property. (In that situation it's too late to easily invoke -willChange... properly in response to receiving an -observeValueForKeyPath:ofObject:change:context: message after the change.)
2877
+ Once an error has been signaled to a decoder, it remains set until it has handed off to the first TopLevel decode invocation above it. For example, consider the following call graph:
2878
+ A -decodeTopLevelObjectForKey:error:
2879
+ B -initWithCoder:
2880
+ C -decodeObjectForKey:
2881
+ D -initWithCoder:
2882
+ E -decodeObjectForKey:
2883
+ F -failWithError:
1086
2884
 
1087
- When this option is specified, the change dictionary in a notification sent after a change contains the same entries that it would contain if this option were not specified, except for ordered unique to-many relationships represented by NSOrderedSets. For those, for NSKeyValueChangeInsertion and NSKeyValueChangeReplacement changes, the change dictionary for a will-change notification contains an NSKeyValueChangeIndexesKey (and NSKeyValueChangeOldKey in the case of Replacement where the NSKeyValueObservingOptionOld option was specified at registration time) which give the indexes (and objects) which *may* be changed by the operation. The second notification, after the change, contains entries reporting what did actually change. For NSKeyValueChangeRemoval changes, removals by index are precise.
1088
- */
1089
- NSKeyValueObservingOptionPrior __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = 0x08
2885
+ In this case the error provided in stack-frame F will be returned via the outError in stack-frame A. Furthermore the result object from decodeTopLevelObjectForKey:error: will be nil, regardless of the result of stack-frame B.
2886
+
2887
+ NSCoder implementations support two mechanisms for the stack-unwinding from F to A:
2888
+ - forced (NSException based)
2889
+ - particpatory (error based)
2890
+
2891
+ The kind of unwinding you get is determined by the decodingFailurePolicy property of this NSCoder (which defaults to NSDecodingFailurePolicyRaiseException to match historical behavior).
2892
+ */
2893
+
2894
+ /// Signals to this coder that the decode operation has failed.
2895
+ ///
2896
+ /// Typically, you call this method in your ``NSCoding/init(coder:)`` implementation. You should set the error when you detect problems such as lack of secure coding, data corruption, or a domain validation failure.
2897
+ ///
2898
+ /// This method is only meaningful to call for decodes.
2899
+ ///
2900
+ /// The effect of calling this method depends on the value of ``decodingFailurePolicy``, as follows:
2901
+ ///
2902
+ /// - If the policy is ``DecodingFailurePolicy/raiseException``, calling this method throws an exception immediately. Swift code cannot catch this kind of exception.
2903
+ /// - If the policy is ``DecodingFailurePolicy/setErrorAndReturn``, calling this method sets the error property once per call to one of the `decode` methods. Calling it repeatedly has no effect until the call stack unwinds to one of these methods' entry points.
2904
+ ///
2905
+ /// After calling `failWithError:` within your ``NSCoding/init(coder:)`` implementation, you should clean up and return `nil` as early as possible.
2906
+ ///
2907
+ /// - Parameter error: An error that indicates why decoding failed.
2908
+
2909
+ /// The action the coder should take when decoding fails.
2910
+ ///
2911
+ /// A decode call can fail for the following reasons:
2912
+ ///
2913
+ /// - The keyed archive data is corrupt or missing.
2914
+ /// - A type mismatch occurs, such as expecting a class but encountering a numeric type instead. This also occurs when `decodeInteger(forKey:)` encounters a value encoded as floating-point, or vice versa.
2915
+ /// - A secure coding violation occurs. This happens when you attempt to decode an object that doesn't conform to `NSSecureCoding`, or when the encoded type doesn't match any of the expected types.
2916
+ @property (readonly) NSDecodingFailurePolicy decodingFailurePolicy API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
2917
+
2918
+ /// An error in the top-level decode.
2919
+ ///
2920
+ /// The meaning of this property depends on the setting of the `decodingFailurePolicy` property. For `NSDecodingFailurePolicyRaiseException`, this property is always `nil`. For `NSDecodingFailurePolicySetErrorAndReturn`, a non-`nil` value represents the first error encountered while decoding the archive.
2921
+ ///
2922
+ /// While `error` is non-`nil`, all attempts to decode data from this coder will return a `nil`/zero-equivalent value. This error is consumed by a top-level decode API, which resets the coder back to being able to potentially decode data.
2923
+ @property (nullable, readonly, copy) NSError *error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1090
2924
 
1091
- };
1092
- typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
1093
- NSKeyValueChangeSetting = 1,
1094
- NSKeyValueChangeInsertion = 2,
1095
- NSKeyValueChangeRemoval = 3,
1096
- NSKeyValueChangeReplacement = 4,
1097
- };
1098
- @interface NSDirectoryEnumerator<ObjectType> : NSEnumerator<ObjectType>
1099
2925
  @end
1100
- @interface NSFileManager : NSObject
1101
- - (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory;
1102
- - (BOOL)moveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1103
- - (BOOL)removeItemAtURL:(NSURL *)URL error:(NSError **)error __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1104
- - (nullable NSDirectoryEnumerator<NSURL *> *)enumeratorAtURL:(NSURL *)url includingPropertiesForKeys:(nullable NSArray<NSURLResourceKey> *)keys options:(NSDirectoryEnumerationOptions)mask errorHandler:(nullable BOOL (^)(NSURL *url, NSError *error))handler __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1105
- @property (class, readonly, strong) NSFileManager *defaultManager;
1106
- - (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1107
- - (BOOL)setAttributes:(NSDictionary<NSFileAttributeKey, id> *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1108
- - (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1109
- - (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1110
- - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1111
- - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error;
1112
- - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;
1113
- - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1114
- - (BOOL)fileExistsAtPath:(NSString *)path;
1115
- - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1116
- - (nullable NSData *)contentsAtPath:(NSString *)path;
2926
+ @interface NSCoder (NSExtendedCoderPrimitives)
2927
+ - (nullable void *)decodeBytesWithReturnedLength:(NSUInteger *)lengthp NS_RETURNS_INNER_POINTER;
2928
+ - (void)setObjectZone:(nullable NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
2929
+ - (nullable NSZone *)objectZone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
2930
+ - (nullable void *)decodeBytesWithMinimumLength:(NSUInteger)length API_AVAILABLE(macos(15.4), ios(18.4), watchos(11.4), tvos(18.4), visionos(2.4)) NS_RETURNS_INNER_POINTER;
2931
+ - (nullable const uint8_t *)decodeBytesForKey:(NSString *)key minimumLength:(NSUInteger)length API_AVAILABLE(macos(15.4), ios(18.4), watchos(11.4), tvos(18.4), visionos(2.4)) NS_RETURNS_INNER_POINTER;
2932
+ - (nullable NSArray *)decodeArrayOfObjectsOfClass:(Class)cls forKey:(NSString *)key API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) NS_REFINED_FOR_SWIFT;
2933
+ - (nullable NSDictionary *)decodeDictionaryWithKeysOfClass:(Class)keyCls objectsOfClass:(Class)objectCls forKey:(NSString *)key API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) NS_REFINED_FOR_SWIFT;
2934
+ - (nullable NSArray *)decodeArrayOfObjectsOfClasses:(NSSet<Class> *)classes forKey:(NSString *)key API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) NS_REFINED_FOR_SWIFT;
2935
+ - (nullable NSDictionary *)decodeDictionaryWithKeysOfClasses:(NSSet<Class> *)keyClasses objectsOfClasses:(NSSet<Class> *)objectClasses forKey:(NSString *)key API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0)) NS_REFINED_FOR_SWIFT;
2936
+ - (void)failWithError:(NSError *)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1117
2937
  @end
1118
- NS_SWIFT_NAME(FileHandle)
1119
- @interface NSFileHandle : NSObject <NSSecureCoding>
1120
- + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path;
1121
- @property (readonly) int fileDescriptor;
1122
- - (BOOL)writeData:(NSData *)data error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1123
- - (BOOL)getOffset:(out unsigned long long *)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1124
- - (BOOL)seekToEndReturningOffset:(out unsigned long long *_Nullable)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1125
- - (BOOL)synchronizeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
1126
- - (BOOL)closeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
1127
- - (void)writeData:(NSData *)data __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeData:error:")));
1128
- @property (readonly) unsigned long long offsetInFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getOffset:error:")));
1129
- - (unsigned long long)seekToEndOfFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:")));
1130
- - (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
1131
- - (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
2938
+ @interface NSCoder (SwiftFoundationErrorStorage)
2939
+ - (void)__setError:(NSError *)error NS_SWIFT_NAME(_setDecodeError(_:));
1132
2940
  @end
1133
- NS_SWIFT_NAME(ProcessInfo)
1134
- @interface NSProcessInfo : NSObject
1135
- @property (readonly) NSUInteger activeProcessorCount __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1136
- @property (readonly) unsigned long long physicalMemory __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1137
- @property (class, readonly, strong) NSProcessInfo *processInfo;
1138
- @property (copy) NSString *processName;
1139
- @property (readonly) int processIdentifier;
1140
- @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
1141
- @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
2941
+ @interface NSCoder (NSTypedstreamCompatibility)
2942
+
2943
+ /// Encodes an old-style object onto the coder.
2944
+ ///
2945
+ /// @DeprecationSummary {
2946
+ /// Apple discourages the use of this symbol.
2947
+ /// }
2948
+ ///
2949
+ /// No sharing is done across separate ``encodeNXObject:`` invocations. Callers must have implemented an ``NSCoding/encode(with:)``, which parallels the `write:` methods, on all of their classes that may be touched by this operation.
2950
+ - (void)encodeNXObject:(id)object API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2951
+
2952
+ /// Decodes an object previously written with ``encodeNXObject:``.
2953
+ ///
2954
+ /// @DeprecationSummary {
2955
+ /// Apple discourages the use of this symbol.
2956
+ /// }
2957
+ ///
2958
+ /// No sharing is done across separate ``decodeNXObject`` invocations. Callers must have implemented an ``NSCoding/init(coder:)``, which parallels the `read:` methods, on all of their classes that may be touched by this operation. The returned object is autoreleased.
2959
+ - (nullable id)decodeNXObject API_DEPRECATED("Not supported", macos(10.0,10.5), ios(2.0,2.0), watchos(2.0,2.0), tvos(9.0,9.0));
2960
+
1142
2961
  @end
1143
- @interface NSProcessInfo (NSProcessInfoPlatform)
1144
- @property (readonly, getter=isiOSAppOnMac) BOOL iOSAppOnMac __attribute__((availability(macos,introduced=11.0), availability(ios,introduced=14.0), availability(watchos,introduced=7.0), availability(tvos,introduced=14.0)));
2962
+ @interface NSCoder (SwiftFoundationCoding)
2963
+ - (void)encodePropertyList:(id)propertyList;
2964
+ - (nullable id)decodePropertyList;
2965
+ - (NSArray *)_decodeArrayOfObjectsForKey:(NSString *)key NS_SWIFT_NAME(_decodeArrayOfObjectsForKey(_:));
2966
+ - (nullable id)_decodePropertyListForKey:(NSString *)key NS_SWIFT_NAME(_decodePropertyListForKey(_:));
1145
2967
  @end
1146
- @interface NSCoder : NSObject
1147
- - (nullable id)decodeTopLevelObjectForKey:(NSString *)key error:(NSError **)error __attribute__((availability(macos,introduced=10.11), availability(ios,introduced=9.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) NS_SWIFT_UNAVAILABLE("Use 'decodeObject(of:, forKey:)' instead");
1148
- - (void)encodeObject:(nullable id)object forKey:(NSString *)key;
1149
- - (nullable id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=6.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2968
+ @interface NSCoder(NSDeprecated)
2969
+ /// Decodes a single value, whose Objective-C type is given by `type`.
2970
+ ///
2971
+ /// @DeprecationSummary {
2972
+ /// Use ``decodeValueOfObjCType:at:size:`` instead.
2973
+ /// }
2974
+ ///
2975
+ /// This method is unsafe because it could potentially cause buffer overruns.
2976
+ - (void)decodeValueOfObjCType:(const char *)type at:(void *)data API_DEPRECATED_WITH_REPLACEMENT("decodeValueOfObjCType:at:size:", macos(10.0, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
2977
+
1150
2978
  @end
1151
2979
  NS_SWIFT_NAME(NSKeyedArchiver)
1152
2980
  @interface NSKeyedArchiver : NSCoder
@@ -1346,7 +3174,8 @@ FOUNDATION_EXPORT NSURLResourceKey const NSURLContentModificationDateKey __a
1346
3174
  FOUNDATION_EXPORT NSURLResourceKey const NSURLAttributeModificationDateKey __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1347
3175
  FOUNDATION_EXPORT NSURLResourceKey const NSURLIsExcludedFromBackupKey __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=5.1), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1348
3176
  FOUNDATION_EXPORT NSErrorDomain const NSPOSIXErrorDomain;
1349
- FOUNDATION_EXPORT NSExceptionName const NSInternalInconsistencyException;
3177
+ FOUNDATION_EXPORT NSErrorDomain const NSOSStatusErrorDomain;
3178
+ FOUNDATION_EXPORT NSErrorDomain const NSMachErrorDomain;
1350
3179
  @interface NSTextCheckingResult : NSObject <NSCopying, NSSecureCoding>
1351
3180
  @property (readonly) NSRange range;
1352
3181
  - (NSRange)rangeAtIndex:(NSUInteger)idx __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
@@ -1375,6 +3204,7 @@ typedef NS_OPTIONS(NSUInteger, NSMatchingFlags) {
1375
3204
  NSMatchingInternalError = 1 << 4
1376
3205
  };
1377
3206
  @interface NSRegularExpression : NSObject <NSCopying, NSSecureCoding>
3207
+ - (NSUInteger)numberOfMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range;
1378
3208
  + (nullable NSRegularExpression *)regularExpressionWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error;
1379
3209
  - (void)enumerateMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range usingBlock:(void (NS_NOESCAPE ^)(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL *stop))block;
1380
3210
  @end
@@ -1485,6 +3315,7 @@ NS_ROOT_CLASS
1485
3315
  - (void)didChangeValueForKey:(NSString *)key NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Only notify of changes to a key in a synchronous context. Notifying changes across suspension points has undefined behavior.");
1486
3316
  - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context;
1487
3317
  - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath context:(nullable void *)context __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=5.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
3318
+ - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath;
1488
3319
  @end
1489
3320
  @interface NSBlockOperation : NSOperation
1490
3321
  + (instancetype)blockOperationWithBlock:(void (NS_SWIFT_SENDABLE ^)(void))block;
@@ -1502,20 +3333,10 @@ FOUNDATION_EXPORT NSString * const NSKeyedArchiveRootObjectKey __attribute__((av
1502
3333
  FOUNDATION_EXPORT NSURLResourceKey const NSURLFileSizeKey __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1503
3334
  FOUNDATION_EXPORT NSURLResourceKey const NSURLTotalFileAllocatedSizeKey __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=5.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1504
3335
  #define NSURLResponseUnknownLength ((long long)-1)
1505
- @class NSURLProtectionSpace;
1506
- @interface NSURLAuthenticationChallenge : NSObject <NSSecureCoding>
1507
- @property (readonly, copy) NSURLProtectionSpace *protectionSpace;
1508
- @property (readonly) NSInteger previousFailureCount;
1509
- @end
1510
- @interface NSURLProtectionSpace : NSObject <NSSecureCoding, NSCopying>
1511
- @property (readonly, copy) NSString *authenticationMethod;
1512
- @property (nullable, readonly) SecTrustRef serverTrust __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=3.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1513
- @end
1514
3336
  @interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
1515
3337
  @property (readonly, copy) NSURLResponse *response;
1516
3338
  @property (readonly, copy) NSData *data;
1517
3339
  @end
1518
- FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodServerTrust __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=3.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1519
3340
  FOUNDATION_EXPORT NSErrorDomain const NSURLErrorDomain;
1520
3341
  NS_ERROR_ENUM(NSURLErrorDomain)
1521
3342
  {
@@ -1573,3 +3394,712 @@ NS_ERROR_ENUM(NSURLErrorDomain)
1573
3394
  NSURLErrorBackgroundSessionInUseByAnotherProcess __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = -996,
1574
3395
  NSURLErrorBackgroundSessionWasDisconnected __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))= -997,
1575
3396
  };
3397
+
3398
+ /*
3399
+ NSFileVersion.h
3400
+ Copyright (c) 2010-2019, Apple Inc.
3401
+ All rights reserved.
3402
+ */
3403
+
3404
+
3405
+
3406
+ @class NSArray<ObjectType>, NSDate, NSDictionary, NSError, NSString, NSURL, NSPersonNameComponents;
3407
+
3408
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3409
+
3410
+ /// Options for adding a new file version.
3411
+ typedef NS_OPTIONS(NSUInteger, NSFileVersionAddingOptions) {
3412
+
3413
+ /// Whether +addVersionOfItemAtURL:withContentsOfURL:options:error: can move the new version contents file into the version store instead of copying it. Moving is much faster. See the comment for -temporaryDirectoryURLForNewVersionOfItemAtURL: for an example of when this useful.
3414
+ NSFileVersionAddingByMoving = 1 << 0
3415
+
3416
+ };
3417
+
3418
+ /// Options for replacing a file version.
3419
+ typedef NS_OPTIONS(NSUInteger, NSFileVersionReplacingOptions) {
3420
+
3421
+ /// Whether -replaceItemAtURL:options:error: must move the version's contents out of the version store instead of copying it. This is useful when you want to promote a version's contents to a separate file. You wouldn't use this to restore a version of a file.
3422
+ NSFileVersionReplacingByMoving = 1 << 0
3423
+
3424
+ };
3425
+
3426
+ // Instances of NSFileVersion for the same version of the same file are equal, and instances of NSFileVersion for different versions of the same file are not equal, but the equality of NSFileVersions for different files is undefined. Repeated invocations of the methods that return NSFileVersions do not necessarily return the exact same instance of NSFileVersion.
3427
+
3428
+ /// A snapshot of a file at a specific point in time.
3429
+ ///
3430
+ /// Use the methods of this class to access, create, and manage file revisions in your app.
3431
+ ///
3432
+ /// Each file version instance contains metadata about a single revision, including the location of the associated file, the modification date of the revision, and whether the revision is discardable.
3433
+ ///
3434
+ /// In Mac apps, you can use file version objects to track changes to a local file over time and to prevent the loss of data during editing. When managing local versions, the document architecture creates versions at specific points in the lifetime of your application. Your application can also create versions explicitly at times that your application designates as appropriate.
3435
+ ///
3436
+ /// In addition to managing local files, the system also uses this class to manage cloud-based files. For files in the cloud, there is usually only one version of the file at any given time. However, additional file versions may be created in cases where two different computers attempt to save the file to the cloud at the same time. In that case, one file is chosen as the current version and any other versions are tagged as being in conflict with the original. Conflict versions are reported to the appropriate file presenter objects and should be resolved as soon as possible so that the corresponding files can be removed from the cloud.
3437
+ API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0))
3438
+ @interface NSFileVersion : NSObject
3439
+
3440
+ /// Returns the most recent version object for the file at the specified URL.
3441
+ ///
3442
+ /// - Parameter url: The URL of the file whose version object you want.
3443
+ /// - Returns: The version object representing the current version of the file or nil if there is no such file.
3444
+ + (nullable NSFileVersion *)currentVersionOfItemAtURL:(NSURL *)url;
3445
+
3446
+ /// Returns all versions of the specified file except the current version.
3447
+ ///
3448
+ /// - Parameter url: The URL of the file whose versions you want.
3449
+ /// - Returns: An array of file version objects or nil if there is no such file. The array does not contain the version object returned by the +currentVersionOfItemAtURL: method.
3450
+ ///
3451
+ /// For locally based files, this property typically contains versions of the file that you saved explicitly or that were saved at appropriate times while the file was being edited. For documents residing in the cloud, this property typically returns zero or more file versions representing conflicting versions of a file that need to be resolved with the current version.
3452
+ + (nullable NSArray<NSFileVersion *> *)otherVersionsOfItemAtURL:(NSURL *)url;
3453
+
3454
+ /// Returns an array of version objects that are currently in conflict for the specified URL.
3455
+ ///
3456
+ /// - Parameter url: The URL of the file that has associated version objects.
3457
+ /// - Returns: An array of NSFileVersion objects that represent the versions in conflict or nil if the file at URL does not exist.
3458
+ + (nullable NSArray<NSFileVersion *> *)unresolvedConflictVersionsOfItemAtURL:(NSURL *)url;
3459
+
3460
+ /// Asynchronously returns an array of NSFileVersions associated with the file located by the given URL, or nil if there is no such file or another error occurs.
3461
+ ///
3462
+ /// Versions returned by this method do not initially have their contents stored locally on the device, so a download may be required before you are able to access them. File attributes are accessible via -[NSURL getPromisedItemResourceValue:forKey:error:]. You can request a download by performing a coordinated read with NSFileCoordinator on the URL property of the resulting NSFileVersions.
3463
+ ///
3464
+ /// When a version is successfully downloaded, its contents are cached locally, and the version will no longer be returned by this method. The version will be returned by +otherVersionsOfItemAtURL: instead, but will retain the same persistentIdentifier value.
3465
+ + (void)getNonlocalVersionsOfItemAtURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSArray<NSFileVersion *> * _Nullable nonlocalFileVersions, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3466
+
3467
+ /// Returns the version of the file that has the specified persistent ID.
3468
+ ///
3469
+ /// - Parameter url: The URL of the file whose version you want.
3470
+ /// - Parameter persistentIdentifier: The persistent ID of the NSFileVersion object you want.
3471
+ /// - Returns: The file version object with the specified ID or nil if no such version object exists.
3472
+ + (nullable NSFileVersion *)versionOfItemAtURL:(NSURL *)url forPersistentIdentifier:(id)persistentIdentifier;
3473
+
3474
+ /// Creates a version of the file at the specified location.
3475
+ ///
3476
+ /// You can use this method to save a version of your file to the location specified by the url parameter. The contents of the file are taken from the contentsURL parameter, whose value may be the same as the url parameter.
3477
+ ///
3478
+ /// You should always add file versions as part of a coordinated write operation to a file. In other words, always call this method from a block passed to a file coordinator object to initiate a write operation. Doing so ensures that no other processes are operating on the file while you save the version to its new location.
3479
+ ///
3480
+ /// You can add versions only on Mac OS X.
3481
+ + (nullable NSFileVersion *)addVersionOfItemAtURL:(NSURL *)url withContentsOfURL:(NSURL *)contentsURL options:(NSFileVersionAddingOptions)options error:(NSError **)outError API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3482
+
3483
+ /// Creates and returns a temporary directory to use for saving the contents of the file.
3484
+ ///
3485
+ /// You can use this method in situations where you want to write the contents for a new file version in a temporary location. When you finish creating the temporary file within the returned directory, add it as a new version with -addVersionOfItemAtURL:withContentsOfURL:options:error: with the NSFileVersionAddingByMoving option. You must delete the directory returned by this method when you are done with it.
3486
+ + (NSURL *)temporaryDirectoryURLForNewVersionOfItemAtURL:(NSURL *)url API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3487
+
3488
+ /// The URL identifying the location of the file associated with the file version object.
3489
+ ///
3490
+ /// The URL identifies the location of the file associated with this version. If this version of the file has been deleted, the value in this property is nil.
3491
+ ///
3492
+ /// Do not display any part of this URL to the user. The location of file versions is managed by the system and should not be exposed to the user. If you want to present the name of a file version, use the localizedName property.
3493
+ @property (readonly, copy) NSURL *URL;
3494
+
3495
+ /// The string containing the user-presentable name of the file version.
3496
+ ///
3497
+ /// When displaying different versions of a file to the user, you should present this string to the user instead of the version's URL.
3498
+ @property (nullable, readonly, copy) NSString *localizedName;
3499
+
3500
+ /// The user-presentable name of the computer on which the revision was saved.
3501
+ ///
3502
+ /// If the current revision has been deleted from disk, or if no computer name was recorded, the value in this property is nil. The computer name is guaranteed to be recorded only when the current version is in conflict with another version. The version object does not track changes to the computer name itself. Thus, if the computer name changed, the value in this string might be an old value.
3503
+ @property (nullable, readonly, copy) NSString *localizedNameOfSavingComputer;
3504
+
3505
+ /// The name components of the user who created this version of the file. Is nil if the file is not shared or if the current user is the originator.
3506
+ @property (nullable, readonly, copy) NSPersonNameComponents *originatorNameComponents API_AVAILABLE(macosx(10.12), ios(10.0)) API_UNAVAILABLE(watchos, tvos);
3507
+
3508
+ /// The modification date of the version, or possibly nil if the receiver's storage has been deleted.
3509
+ @property (nullable, readonly, copy) NSDate *modificationDate;
3510
+
3511
+ /// The identifier for this version of the file.
3512
+ ///
3513
+ /// You can save the value of this property persistently and use it to recreate the version object later. When recreating the version object using the +versionOfItemAtURL:forPersistentIdentifier: method, the version object returned is equivalent to the current object.
3514
+ @property (readonly, retain) id<NSCoding> persistentIdentifier;
3515
+
3516
+ /// A Boolean value indicating whether the contents of the version are in conflict with the contents of another version.
3517
+ ///
3518
+ /// When two or more versions of a file are written at the same time, perhaps because the file is saved in the cloud and one or more of the writers were offline when they were writing, the system attempts to resolve the conflict automatically. It does this by picking one of the file versions to be the current file and setting this property to YES for the other file versions that are in conflict.
3519
+ @property (readonly, getter=isConflict) BOOL conflict;
3520
+
3521
+ /// A Boolean value that indicates whether the conflict has been resolved.
3522
+ ///
3523
+ /// When the system detects a conflict involving versions of a file, it sets this property to NO to indicate an unresolved conflict. After you resolve the conflict, set this property to YES to tell the system it is resolved; you must then remove any versions of the file that are no longer useful.
3524
+ ///
3525
+ /// Never set the value of this property to NO. If you do, the system raises an exception. Resolving a conflict causes the file version object to be removed from any reports about conflicting versions, such as those returned by the +unresolvedConflictVersionsOfItemAtURL: method.
3526
+ @property (getter=isResolved) BOOL resolved;
3527
+
3528
+ /// A Boolean value that specifies whether the system can delete the associated file at some future time.
3529
+ ///
3530
+ /// Marking a file version as discardable gives the system the flexibility to reclaim the space, occupied by the associated file, at some future time. Do not, however, depend on the file being discarded.
3531
+ ///
3532
+ /// After setting this property to YES, do not set this property to NO again. Doing so causes the system to raise an exception. In addition, if you set this property to YES for the version of the file returned by the +currentVersionOfItemAtURL: method, the system raises an exception.
3533
+ ///
3534
+ /// Versions can be discardable only on Mac OS X.
3535
+ @property (getter=isDiscardable) BOOL discardable API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3536
+
3537
+ /// Whether the version has local contents. Versions that are returned by +getNonlocalVersionsOfItemAtURL:completionHandler: do not initially have local contents. You can only access their contents, either directly via the URL or by invoking -replaceItemAtURL:options:error:, from within a coordinated read on the NSFileVersion's URL.
3538
+ @property (readonly) BOOL hasLocalContents API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3539
+
3540
+ /// Whether the version has a thumbnail image available. Thumbnails for versions from +getNonlocalVersionsOfItemAtURL:completionHandler: may not immediately be available. As soon as it becomes available, this property will change from NO to YES. You can use KVO to be notified of this change. If a thumbnail is available, you can access it using NSURLThumbnailKey or NSURLThumbnailDictionaryKey.
3541
+ @property (readonly) BOOL hasThumbnail API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3542
+
3543
+ /// Replace the contents of the specified file with the contents of the current version's file.
3544
+ ///
3545
+ /// If the passed-in URL locates a file, replace the file with a file whose contents are taken from the version but whose display name is taken from the file. If the passed-in URL does not locate a file then simply write one. The one exception to taking the display name from an existing file is if the version is of a different type than the overwritten file, in which case the file name extension will be taken from the version.
3546
+ ///
3547
+ /// When you use NSFileVersionReplacingByMoving you remove a version of the file, and should do it as part of a coordinated write to the file.
3548
+ - (nullable NSURL *)replaceItemAtURL:(NSURL *)url options:(NSFileVersionReplacingOptions)options error:(NSError **)error;
3549
+
3550
+ /// Remove this version object and its associated file from the version store.
3551
+ ///
3552
+ /// This method removes this version object and its file from the version store, freeing up the associated storage space. You must not call this method for the current file version — that is, the version object returned by the +currentVersionOfItemAtURL: method.
3553
+ ///
3554
+ /// You should always remove file versions as part of a coordinated write operation to a file. Doing so ensures that no other processes are operating on the file while you remove the version information. If successful, subsequent requests for the versions of the file do not include this version object.
3555
+ - (BOOL)removeAndReturnError:(NSError **)outError;
3556
+
3557
+ /// Removes all versions of a file, except the current one, from the version store.
3558
+ ///
3559
+ /// This method removes all versions except the current one from the version store, freeing up the associated storage space.
3560
+ ///
3561
+ /// You should always remove file versions as part of a coordinated write operation to a file. Doing so ensures that no other processes are operating on the file while you remove the version information. If successful, subsequent requests for the versions of the file reflect that only the current version is available.
3562
+ + (BOOL)removeOtherVersionsOfItemAtURL:(NSURL *)url error:(NSError **)outError;
3563
+
3564
+ @end
3565
+
3566
+ NS_HEADER_AUDIT_END(nullability, sendability)
3567
+
3568
+ /*
3569
+ NSURLProtectionSpace.h
3570
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3571
+
3572
+ Public header file.
3573
+ */
3574
+
3575
+ #import <Security/Security.h>
3576
+
3577
+ @class NSString;
3578
+ @class NSArray<ObjectType>;
3579
+ @class NSData;
3580
+
3581
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3582
+
3583
+ /// The protocol for HTTP.
3584
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTP API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3585
+
3586
+ /// The protocol for HTTPS.
3587
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPS API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3588
+
3589
+ /// The protocol for FTP.
3590
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceFTP API_DEPRECATED("FTP is deprecated and only supported in the classic loading mode", macos(10.5,15.4), ios(2.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
3591
+
3592
+ /// The proxy type for HTTP proxies.
3593
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3594
+
3595
+ /// The proxy type for HTTPS proxies.
3596
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPSProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3597
+
3598
+ /// The proxy type for FTP proxies.
3599
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceFTPProxy API_DEPRECATED("FTP is deprecated and only supported in the classic loading mode", macos(10.2,15.4), ios(2.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
3600
+
3601
+ /// The proxy type for SOCKS proxies.
3602
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceSOCKSProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3603
+
3604
+ /// The default authentication method for a protocol.
3605
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodDefault API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3606
+
3607
+ /// HTTP basic authentication. Equivalent to ``NSURLAuthenticationMethodDefault`` for HTTP.
3608
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTTPBasic API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3609
+
3610
+ /// HTTP digest authentication.
3611
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTTPDigest API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3612
+
3613
+ /// HTML form authentication. Applies to any protocol.
3614
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTMLForm API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3615
+
3616
+ /// NTLM authentication.
3617
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodNTLM API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3618
+
3619
+ /// Negotiate authentication.
3620
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodNegotiate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3621
+
3622
+ /// SSL client certificate. Applies to any protocol.
3623
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodClientCertificate API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3624
+
3625
+ /// `SecTrustRef` validation required. Applies to any protocol.
3626
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodServerTrust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3627
+
3628
+ @class NSURLProtectionSpaceInternal;
3629
+
3630
+ /// A server or an area on a server, commonly referred to as a realm, that requires authentication.
3631
+ ///
3632
+ /// A protection space defines a series of matching constraints that determine which credential should be provided. For example, if a request provides your delegate with a ``URLAuthenticationChallenge`` object that requests a client username and password, your app should provide the correct username and password for the particular host, port, protocol, and realm, as specified in the challenge's protection space.
3633
+ ///
3634
+ /// > Note:
3635
+ /// > This class has no designated initializer; its `init` method always returns `nil`. You must initialize this class by calling one of the initialization methods described in Creating a protection space.
3636
+ NS_SWIFT_SENDABLE
3637
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3638
+ @interface NSURLProtectionSpace : NSObject <NSSecureCoding, NSCopying>
3639
+ {
3640
+ @private
3641
+ NSURLProtectionSpaceInternal *_internal;
3642
+ }
3643
+
3644
+ /// Creates a protection space object from the given host, port, protocol, realm, and authentication method.
3645
+ ///
3646
+ /// - Parameters:
3647
+ /// - host: The host name for the protection space object.
3648
+ /// - port: The port for the protection space object. If `port` is `0`, the default port for the specified protocol is used, for example, port 80 for HTTP. Note that servers can, and do, treat these values differently.
3649
+ /// - protocol: The protocol for the protection space object. The value of `protocol` is equivalent to the scheme for a URL in the protection space, for example, `"http"`, `"https"`, `"ftp"`, etc.
3650
+ /// - realm: A string indicating a protocol-specific subdivision of the host. `realm` may be `nil` if there is no specified realm or if the protocol doesn't support realms.
3651
+ /// - authenticationMethod: The type of authentication to use. `authenticationMethod` should be set to one of the authentication method constants or `nil` to use the default.
3652
+ /// - Returns: A new protection space object, initialized with the given host, port, protocol, realm, and authentication method.
3653
+ - (instancetype)initWithHost:(NSString *)host port:(NSInteger)port protocol:(nullable NSString *)protocol realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod;
3654
+
3655
+ /// Creates a protection space object representing a proxy server.
3656
+ ///
3657
+ /// - Parameters:
3658
+ /// - host: The host of the proxy server for the protection space object.
3659
+ /// - port: The port for the protection space object. If `port` is `0`, the default port for the specified proxy type is used, for example, port 80 for HTTP. Note that servers can, and do, treat these values differently.
3660
+ /// - type: The type of proxy server.
3661
+ /// - realm: A string indicating a protocol-specific subdivision of the host. `realm` may be `nil` if there is no specified realm or if the protocol doesn't support realms.
3662
+ /// - authenticationMethod: The type of authentication to use. `authenticationMethod` should be set to one of the authentication method constants or `nil` to use the default.
3663
+ /// - Returns: A new protection space object, with the given host, port, proxy type, realm, and authentication method.
3664
+ - (instancetype)initWithProxyHost:(NSString *)host port:(NSInteger)port type:(nullable NSString *)type realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod;
3665
+
3666
+ /// The receiver's authentication realm.
3667
+ ///
3668
+ /// This value is `nil` if no realm has been set. A realm is generally only specified for HTTP and HTTPS authentication.
3669
+ @property (nullable, readonly, copy) NSString *realm;
3670
+
3671
+ /// A Boolean value that indicates whether the credentials for the protection space can be sent securely.
3672
+ @property (readonly) BOOL receivesCredentialSecurely;
3673
+
3674
+ /// A Boolean value that indicates whether this authenticating protection space is a proxy server.
3675
+ @property (readonly) BOOL isProxy;
3676
+
3677
+ /// The receiver's host.
3678
+ @property (readonly, copy) NSString *host;
3679
+
3680
+ /// The receiver's port.
3681
+ @property (readonly) NSInteger port;
3682
+
3683
+ /// The receiver's proxy type.
3684
+ ///
3685
+ /// This value is `nil` if the receiver does not represent a proxy protection space.
3686
+ @property (nullable, readonly, copy) NSString *proxyType;
3687
+
3688
+ /// The receiver's protocol.
3689
+ ///
3690
+ /// This value is `nil` if the receiver represents a proxy protection space.
3691
+ @property (nullable, readonly, copy) NSString *protocol;
3692
+
3693
+ /// The authentication method used by the receiver.
3694
+ @property (readonly, copy) NSString *authenticationMethod;
3695
+
3696
+ @end
3697
+
3698
+ /// This category supplies additional information for use when a client certificate is required by the server in order to complete authentication.
3699
+ @interface NSURLProtectionSpace(NSClientCertificateSpace)
3700
+
3701
+ /// The acceptable certificate-issuing authorities for client certificate authentication.
3702
+ ///
3703
+ /// Issuers are identified by their distinguished name and returned as DER encoded data.
3704
+ /// This value is `nil` if the authentication method is not `NSURLAuthenticationMethodClientCertificate`.
3705
+ @property (nullable, readonly, copy) NSArray<NSData *> *distinguishedNames API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3706
+
3707
+ @end
3708
+
3709
+ /// This category supplies additional information for use by the client to evaluate whether to trust a given server during a security handshake.
3710
+ @interface NSURLProtectionSpace(NSServerTrustValidationSpace)
3711
+
3712
+ /// A representation of the server's SSL transaction state.
3713
+ ///
3714
+ /// This value is `nil` if the authentication method is not `NSURLAuthenticationMethodServerTrust`.
3715
+ @property (nullable, readonly) SecTrustRef serverTrust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3716
+
3717
+ @end
3718
+
3719
+ NS_HEADER_AUDIT_END(nullability, sendability)
3720
+
3721
+ /*
3722
+ NSURLCredential.h
3723
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3724
+
3725
+ Public header file.
3726
+ */
3727
+
3728
+ #import <Security/Security.h>
3729
+
3730
+ @class NSString;
3731
+ @class NSArray;
3732
+
3733
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3734
+
3735
+ /// Constants defining how long a credential will be kept around.
3736
+ ///
3737
+ /// - `NSURLCredentialPersistenceNone`: This credential won't be saved.
3738
+ /// - `NSURLCredentialPersistenceForSession`: This credential will only be stored for this session.
3739
+ /// - `NSURLCredentialPersistencePermanent`: This credential will be stored permanently. Note: Whereas in Mac OS X any application
3740
+ /// can access any credential provided the user gives permission, in iPhone OS an application can access only its own credentials.
3741
+ /// - `NSURLCredentialPersistenceSynchronizable`: This credential will be stored permanently. Additionally, this credential will be
3742
+ /// distributed to other devices based on the owning AppleID.
3743
+
3744
+ typedef NS_ENUM(NSUInteger, NSURLCredentialPersistence) {
3745
+ /// The credential should not be stored.
3746
+ NSURLCredentialPersistenceNone,
3747
+ /// The credential should be stored only for this session.
3748
+ NSURLCredentialPersistenceForSession,
3749
+ /// The credential should be stored in the keychain.
3750
+ NSURLCredentialPersistencePermanent,
3751
+ /// The credential should be stored permanently in the keychain, and in addition should be distributed to other devices based on the owning Apple ID.
3752
+ NSURLCredentialPersistenceSynchronizable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0))
3753
+ };
3754
+
3755
+ @class NSURLCredentialInternal;
3756
+
3757
+ /// An authentication credential consisting of information specific to the type of credential and the type of persistent storage to use, if any.
3758
+ ///
3759
+ /// The URL Loading System supports password-based user credentials, certificate-based user credentials, and certificate-based server credentials.
3760
+ ///
3761
+ /// When you create a credential, you can specify it for a single request, persist it temporarily (until your app quits), or persist it permanently. Permanent persistence can be local persistence in the keychain, or synchronized persistence across the user's devices, based on their Apple ID.
3762
+ ///
3763
+ /// > Note:
3764
+ /// > Permanent storage of credentials is only available for password-based credentials. TLS credentials are never stored permanently by ``URLCredentialStorage``. In general, use for-session persistence for TLS credentials.
3765
+ NS_SWIFT_SENDABLE
3766
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3767
+ @interface NSURLCredential : NSObject <NSSecureCoding, NSCopying>
3768
+ {
3769
+ @private
3770
+ __strong NSURLCredentialInternal *_internal;
3771
+ }
3772
+
3773
+ /// The credential's persistence setting.
3774
+ @property (readonly) NSURLCredentialPersistence persistence;
3775
+
3776
+ @end
3777
+
3778
+ /// This category defines the methods available to an `NSURLCredential` created to represent an internet password credential.
3779
+ ///
3780
+ /// These are most commonly used for resources that require a username and password combination.
3781
+ @interface NSURLCredential(NSInternetPassword)
3782
+
3783
+ /// Creates a URL credential instance initialized with a given user name and password, using a given persistence setting.
3784
+ ///
3785
+ /// - Parameter user: The user for the credential.
3786
+ /// - Parameter password: The password for `user`.
3787
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3788
+ - (instancetype)initWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;
3789
+
3790
+ /// Creates a new `NSURLCredential` with a user and password.
3791
+ ///
3792
+ /// - Parameter user: The user for the credential.
3793
+ /// - Parameter password: The password for `user`.
3794
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3795
+ /// - Returns: The new autoreleased `NSURLCredential`.
3796
+ + (NSURLCredential *)credentialWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;
3797
+
3798
+ /// The credential's user name.
3799
+ @property (nullable, readonly, copy) NSString *user;
3800
+
3801
+ /// The credential's password.
3802
+ ///
3803
+ /// You should only access this property if you need the actual password value. If you only need to know if there is
3804
+ /// a password, use `hasPassword`. Accessing this property may result in prompting the user for access.
3805
+ @property (nullable, readonly, copy) NSString *password;
3806
+
3807
+ /// A Boolean value that indicates whether the credential has a password.
3808
+ ///
3809
+ /// This method does not attempt to retrieve the password. If this credential's password is stored in the user's
3810
+ /// keychain, the `password` property may return `nil` even if this method returns `YES` -- getting the password may
3811
+ /// fail, or the user may refuse access.
3812
+ @property (readonly) BOOL hasPassword;
3813
+
3814
+ @end
3815
+
3816
+ /// This category defines the methods available to an `NSURLCredential` created to represent a client certificate credential.
3817
+ ///
3818
+ /// Client certificates are commonly stored on the user's computer in the keychain and must be presented to the server during a handshake.
3819
+ @interface NSURLCredential(NSClientCertificate)
3820
+
3821
+ /// Creates a URL credential instance for resolving a client certificate authentication challenge.
3822
+ ///
3823
+ /// - Parameter identity: A `SecIdentityRef` object.
3824
+ /// - Parameter certArray: An array containing at least one `SecCertificateRef` objects, or `nil` if the server
3825
+ /// does not need any intermediate certificates to authenticate the client.
3826
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3827
+ - (instancetype)initWithIdentity:(SecIdentityRef)identity certificates:(nullable NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3828
+
3829
+ /// Creates a new `NSURLCredential` with an identity and certificate array.
3830
+ ///
3831
+ /// - Parameter identity: A `SecIdentityRef` object.
3832
+ /// - Parameter certArray: An array containing at least one `SecCertificateRef` objects.
3833
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3834
+ /// - Returns: The new autoreleased `NSURLCredential`.
3835
+ + (NSURLCredential *)credentialWithIdentity:(SecIdentityRef)identity certificates:(nullable NSArray *)certArray persistence:(NSURLCredentialPersistence)persistence API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3836
+
3837
+ /// The identity of this credential if it is a client certificate credential.
3838
+ ///
3839
+ /// This value is `nil` if the credential is not a client certificate credential.
3840
+ @property (nullable, readonly) SecIdentityRef identity;
3841
+
3842
+ /// The intermediate certificates of the credential, if it is a client certificate credential.
3843
+ ///
3844
+ /// The certificates are `SecCertificateRef` objects. This value is `nil` if this is not a client certificate credential.
3845
+ @property (readonly, copy) NSArray *certificates API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3846
+
3847
+ @end
3848
+
3849
+ @interface NSURLCredential(NSServerTrust)
3850
+
3851
+ /// Creates a URL credential instance for server trust authentication, initialized with an accepted trust.
3852
+ ///
3853
+ /// - Parameter trust: The accepted trust.
3854
+ - (instancetype)initWithTrust:(SecTrustRef)trust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3855
+
3856
+ /// Creates a URL credential instance for server trust authentication with a given accepted trust.
3857
+ ///
3858
+ /// Before creating a server trust credential, it is the responsibility of the delegate of an ``NSURLConnection`` instance or an ``NSURLDownload`` instance to evaluate the trust. Do this by calling `SecTrustEvaluate`, passing it the trust obtained from the `serverTrust` method of the server's ``NSURLProtectionSpace`` instance. If the trust is invalid, the authentication challenge should be cancelled with the ``NSURLAuthenticationChallengeSender`` protocol's `cancelAuthenticationChallenge:` method.
3859
+ ///
3860
+ /// - Parameter trust: The accepted trust.
3861
+ /// - Returns: A new URL credential object, containing the accepted server trust.
3862
+ + (NSURLCredential *)credentialForTrust:(SecTrustRef)trust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3863
+
3864
+ @end
3865
+
3866
+ NS_HEADER_AUDIT_END(nullability, sendability)
3867
+
3868
+ /*
3869
+ NSURLAuthenticationChallenge.h
3870
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3871
+
3872
+ Public header file.
3873
+ */
3874
+
3875
+
3876
+ @class NSURLAuthenticationChallenge;
3877
+ @class NSURLCredential;
3878
+ @class NSURLProtectionSpace;
3879
+ @class NSURLResponse;
3880
+ @class NSError;
3881
+
3882
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3883
+
3884
+ /// The `URLAuthenticationChallengeSender` protocol represents the interface that the sender of an authentication challenge must implement.
3885
+ ///
3886
+ /// The methods in the protocol are generally sent by a delegate in response to receiving a ``NSURLConnectionDelegate/connection(_:didReceive:)``: or ``NSURLDownloadDelegate/download(_:didReceive:)-1pc0v``:. The different methods provide different ways of responding to authentication challenges.
3887
+ ///
3888
+ /// > Important:
3889
+ /// > This protocol is _only_ for use with the legacy ``NSURLConnection`` and ``NSURLDownload`` classes. It should not be used with ``URLSession``-based code, for which you respond to authentication challenges by passing ``URLSession/AuthChallengeDisposition`` constants to the provided completion handler blocks.
3890
+ NS_SWIFT_SENDABLE
3891
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3892
+ @protocol NSURLAuthenticationChallengeSender <NSObject>
3893
+
3894
+ /// Attempts to use a given credential for a given authentication challenge.
3895
+ ///
3896
+ /// This method has no effect if it is called with an authentication challenge that has already been handled.
3897
+ - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3898
+
3899
+ /// Attempts to continue downloading a request without providing a credential for a given challenge.
3900
+ ///
3901
+ /// This method has no effect if it is called with an authentication challenge that has already been handled.
3902
+ - (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3903
+
3904
+ /// Cancels a given authentication challenge.
3905
+ - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3906
+
3907
+ @optional
3908
+ /// Causes the system-provided default behavior to be used.
3909
+ - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3910
+
3911
+ /// Rejects the currently supplied protection space.
3912
+ - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge;
3913
+
3914
+ @end
3915
+
3916
+ @class NSURLAuthenticationChallengeInternal;
3917
+
3918
+ /// A challenge from a server requiring authentication from the client.
3919
+ ///
3920
+ /// Your app receives authentication challenges in various ``URLSession``, ``NSURLConnection``, and ``NSURLDownload`` delegate methods, such as ``URLSessionTaskDelegate/urlSession(_:task:didReceive:completionHandler:)``. These objects provide the information you'll need when deciding how to handle a server's request for authentication.
3921
+ ///
3922
+ /// At the core of that authentication challenge is a _protection space_ that defines the type of authentication being requested, the host and port number, the networking protocol, and (where applicable) the authentication realm (a group of related URLs on the same server that share a single set of credentials).
3923
+ NS_SWIFT_SENDABLE
3924
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3925
+ @interface NSURLAuthenticationChallenge : NSObject <NSSecureCoding>
3926
+ {
3927
+ @private
3928
+ NSURLAuthenticationChallengeInternal *_internal;
3929
+ }
3930
+
3931
+ /// Initializes an authentication challenge.
3932
+ ///
3933
+ /// - Parameter space: The `NSURLProtectionSpace` to use.
3934
+ /// - Parameter credential: The proposed `NSURLCredential` for this challenge, or `nil`.
3935
+ /// - Parameter previousFailureCount: A count of previous failures attempting access.
3936
+ /// - Parameter response: The `NSURLResponse` for the authentication failure, if applicable, else `nil`.
3937
+ /// - Parameter error: The `NSError` for the authentication failure, if applicable, else `nil`.
3938
+ /// - Parameter sender: The sender of this challenge.
3939
+ /// - Returns: An authentication challenge initialized with the specified parameters.
3940
+ - (instancetype)initWithProtectionSpace:(NSURLProtectionSpace *)space proposedCredential:(nullable NSURLCredential *)credential previousFailureCount:(NSInteger)previousFailureCount failureResponse:(nullable NSURLResponse *)response error:(nullable NSError *)error sender:(id<NSURLAuthenticationChallengeSender>)sender;
3941
+
3942
+ /// Initializes an authentication challenge copying all parameters from another one.
3943
+ ///
3944
+ /// - Parameter challenge: The existing challenge to copy.
3945
+ /// - Parameter sender: The sender of the challenge.
3946
+ /// - Returns: A new challenge initialized with the parameters from the passed in challenge.
3947
+ ///
3948
+ /// This initializer may be useful to subclassers that want to proxy one type of authentication challenge to look like another type.
3949
+ - (instancetype)initWithAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge sender:(id<NSURLAuthenticationChallengeSender>)sender;
3950
+
3951
+ /// A description of the protection space that requires authentication.
3952
+ @property (readonly, copy) NSURLProtectionSpace *protectionSpace;
3953
+
3954
+ /// The proposed credential for this challenge.
3955
+ ///
3956
+ /// The proposed credential may be `nil`, if there is no default credential to use for this challenge (either stored
3957
+ /// or in the URL). If the credential is not `nil` and returns `YES` for `hasPassword`, it is ready to use as-is.
3958
+ /// If it returns `NO` for `hasPassword`, it provides a default username the client could use when prompting.
3959
+ @property (nullable, readonly, copy) NSURLCredential *proposedCredential;
3960
+
3961
+ /// The count of previous failed authentication attempts.
3962
+ @property (readonly) NSInteger previousFailureCount;
3963
+
3964
+ /// The response representing authentication failure.
3965
+ ///
3966
+ /// If there was a previous authentication failure, and this protocol uses responses to indicate authentication
3967
+ /// failure, then this method will return the response. Otherwise it will return `nil`.
3968
+ @property (nullable, readonly, copy) NSURLResponse *failureResponse;
3969
+
3970
+ /// The error representing authentication failure.
3971
+ ///
3972
+ /// If there was a previous authentication failure, and this protocol uses errors to indicate authentication
3973
+ /// failure, then this method will return the error. Otherwise it will return `nil`.
3974
+ @property (nullable, readonly, copy) NSError *error;
3975
+
3976
+ /// The sender of this challenge.
3977
+ ///
3978
+ /// The sender is the object you should reply to when done processing the challenge.
3979
+ @property (nullable, readonly, retain) id<NSURLAuthenticationChallengeSender> sender;
3980
+
3981
+ @end
3982
+
3983
+ NS_HEADER_AUDIT_END(nullability, sendability)
3984
+
3985
+ /*
3986
+ NSURLCredentialStorage.h
3987
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3988
+
3989
+ Public header file.
3990
+ */
3991
+
3992
+
3993
+ @class NSDictionary<KeyType, ObjectType>;
3994
+ @class NSString;
3995
+ @class NSURLCredential;
3996
+ @class NSURLSessionTask;
3997
+
3998
+ @class NSURLCredentialStorageInternal;
3999
+
4000
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
4001
+
4002
+ /// The manager of a shared credentials cache.
4003
+ ///
4004
+ /// The shared cache stores and retrieves instances of ``URLCredential``. You can store password-based credentials permanently, based on the ``URLCredential/Persistence`` they were created with. Certificate-based credentials are never stored permanently.
4005
+ ///
4006
+ /// ### Subclassing notes
4007
+ ///
4008
+ /// The ``URLCredentialStorage`` class is meant to be used as-is, but you can subclass it if you have specific needs, such as screening which credentials are stored.
4009
+ ///
4010
+ /// When overriding methods of this class, be aware that methods that take a `task` parameter are preferred to equivalent methods that do not. Therefore, you should override the task-based methods when subclassing, as follows:
4011
+ ///
4012
+ /// - Setting credentials — Override ``set(_:for:task:)`` instead of or in addition to ``set(_:for:)``.
4013
+ /// - Getting credentials — Override ``getCredentials(for:task:completionHandler:)`` instead of or in addition to ``credentials(for:)``.
4014
+ /// - Removing credentials — Override ``remove(_:for:options:task:)`` instead of or in addition to ``remove(_:for:options:)`` and ``remove(_:for:)``.
4015
+ /// - Setting default credentials — Override ``setDefaultCredential(_:for:task:)`` instead of or in addition to ``setDefaultCredential(_:for:)``.
4016
+ /// - Getting default credentials — Override ``getDefaultCredential(for:task:completionHandler:)`` instead of or in addition to ``defaultCredential(for:)``.
4017
+ NS_SWIFT_SENDABLE
4018
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
4019
+ @interface NSURLCredentialStorage : NSObject
4020
+ {
4021
+ @private
4022
+ NSURLCredentialStorageInternal *_internal;
4023
+ }
4024
+
4025
+ /// The shared singleton authentication storage.
4026
+ @property (class, readonly, strong) NSURLCredentialStorage *sharedCredentialStorage;
4027
+
4028
+ /// Gets a dictionary mapping usernames to credentials for the specified protection space.
4029
+ ///
4030
+ /// - Parameter space: An `NSURLProtectionSpace` indicating the protection space for which to get credentials.
4031
+ /// - Returns: A dictionary where the keys are usernames and the values are the corresponding `NSURLCredential` instances.
4032
+ - (nullable NSDictionary<NSString *, NSURLCredential *> *)credentialsForProtectionSpace:(NSURLProtectionSpace *)space;
4033
+
4034
+ /// The credentials for all available protection spaces.
4035
+ ///
4036
+ /// The dictionary has keys corresponding to `NSURLProtectionSpace` instances. The values are dictionaries where the
4037
+ /// keys are user name strings, and each value is the corresponding `NSURLCredential` instance.
4038
+ @property (readonly, copy) NSDictionary<NSURLProtectionSpace *, NSDictionary<NSString *, NSURLCredential *> *> *allCredentials;
4039
+
4040
+ /// Adds a new credential to the set for the specified protection space or replaces an existing one.
4041
+ ///
4042
+ /// - Parameter credential: The credential to set.
4043
+ /// - Parameter space: The protection space for which to add it.
4044
+ ///
4045
+ /// Multiple credentials may be set for a given protection space, but each must have a distinct user. If a credential
4046
+ /// with the same user is already set for the protection space, the new one will replace it.
4047
+ - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4048
+
4049
+ /// Removes the credential from the set for the specified protection space.
4050
+ ///
4051
+ /// - Parameter credential: The credential to remove.
4052
+ /// - Parameter space: The protection space for which a credential should be removed.
4053
+ ///
4054
+ /// The credential is removed from both persistent and temporary storage. A credential that has a persistence
4055
+ /// policy of `NSURLCredentialPersistenceSynchronizable` will fail. See `removeCredential:forProtectionSpace:options:`.
4056
+ - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4057
+
4058
+ /// Removes the credential from the set for the specified protection space based on options.
4059
+ ///
4060
+ /// - Parameter credential: The credential to remove.
4061
+ /// - Parameter space: The protection space for which a credential should be removed.
4062
+ /// - Parameter options: A dictionary containing options to consider when removing the credential. This should be used
4063
+ /// when trying to delete a credential that has the `NSURLCredentialPersistenceSynchronizable` policy. When such
4064
+ /// credentials are removed, the credential will be removed on all devices that contain this credential.
4065
+ ///
4066
+ /// The credential is removed from both persistent and temporary storage.
4067
+ - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space options:(nullable NSDictionary<NSString *, id> *)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
4068
+
4069
+ /// Gets the default credential for the specified protection space.
4070
+ ///
4071
+ /// - Parameter space: The protection space for which to get the default credential.
4072
+ - (nullable NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space;
4073
+
4074
+ /// Sets the default credential for the specified protection space.
4075
+ ///
4076
+ /// - Parameter credential: The credential to set as default.
4077
+ /// - Parameter space: The protection space for which the credential should be set as default.
4078
+ ///
4079
+ /// If the credential is not yet in the set for the protection space, it will be added to it.
4080
+ - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4081
+
4082
+ @end
4083
+
4084
+ @interface NSURLCredentialStorage (NSURLSessionTaskAdditions)
4085
+ /// Fetches credentials for the specified protection space and task, passing them to the completion handler.
4086
+ - (void)getCredentialsForProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSDictionary<NSString *, NSURLCredential *> * _Nullable credentials))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0)) NS_SWIFT_ASYNC_NAME(credentials(for:task:));
4087
+ /// Sets a credential for the specified protection space and task.
4088
+ - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4089
+ /// Removes a credential for the specified protection space, options, and task.
4090
+ - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace options:(nullable NSDictionary<NSString *, id> *)options task:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4091
+ /// Fetches the default credential for the specified protection space and task, passing it to the completion handler.
4092
+ - (void)getDefaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space task:(NSURLSessionTask *)task completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSURLCredential * _Nullable credential))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4093
+ /// Sets the default credential for the specified protection space and task.
4094
+ - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4095
+ @end
4096
+
4097
+ /// This notification is sent on the main thread whenever the set of stored credentials changes.
4098
+ FOUNDATION_EXPORT NSNotificationName const NSURLCredentialStorageChangedNotification API_DEPRECATED("Notification is never posted", macos(10.2, 10.14), ios(2.0, 12.0), watchos(2.0, 5.0), tvos(9.0, 12.0));
4099
+
4100
+ /// The corresponding value is an `NSNumber` object representing a Boolean value that indicates whether credentials which contain the ``URLCredential/Persistence/synchronizable`` attribute should be removed.
4101
+ ///
4102
+ /// If the key is missing or the value is `@NO`, then no attempt will be made to remove such a credential.
4103
+ FOUNDATION_EXPORT NSString *const NSURLCredentialStorageRemoveSynchronizableCredentials API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
4104
+
4105
+ NS_HEADER_AUDIT_END(nullability, sendability)