peachsim 0.1.1700 → 0.1.1728

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 (950) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +79 -5
  3. package/cli/app-bundle-resources.ts +5 -2
  4. package/cli/app-catalog.ts +10 -0
  5. package/cli/app-fonts.ts +5 -5
  6. package/cli/app-splash.ts +4 -4
  7. package/cli/app-stubs.ts +36 -9
  8. package/cli/bridge-diagnostics.ts +2 -1
  9. package/cli/cloud-client.ts +6 -3
  10. package/cli/command-registry.ts +1 -0
  11. package/cli/commands/control.ts +180 -837
  12. package/cli/commands/coverage-swift.ts +19 -1
  13. package/cli/commands/daemon.ts +8 -0
  14. package/cli/commands/detect.ts +84 -37
  15. package/cli/commands/detox.ts +3 -0
  16. package/cli/commands/doctor.ts +178 -22
  17. package/cli/commands/flow.ts +4 -1
  18. package/cli/commands/inspect/actions.ts +74 -14
  19. package/cli/commands/inspect/core.ts +181 -18
  20. package/cli/commands/inspect/settling.ts +22 -7
  21. package/cli/commands/inspect/wait-ready.ts +13 -5
  22. package/cli/commands/inspect.ts +56 -47
  23. package/cli/commands/kotlin.ts +12 -2
  24. package/cli/commands/package.ts +750 -0
  25. package/cli/commands/record.ts +263 -32
  26. package/cli/commands/screenshot.ts +2 -13
  27. package/cli/commands/serve.ts +6 -0
  28. package/cli/commands/shell-url.ts +834 -0
  29. package/cli/commands/swift.ts +42 -102
  30. package/cli/commands/test.ts +69 -101
  31. package/cli/commands/upload.ts +1 -1
  32. package/cli/current-sim.ts +4 -4
  33. package/cli/device-option.ts +1 -1
  34. package/cli/hints.ts +1 -6
  35. package/cli/main.ts +20 -1
  36. package/cli/metro-bundle-assets.ts +77 -0
  37. package/cli/native-input.ts +199 -0
  38. package/cli/outbound-endpoints.ts +32 -3
  39. package/cli/packaged-app-launcher.ts +95 -0
  40. package/cli/run-registry.ts +0 -8
  41. package/cli/scene-video.ts +18 -9
  42. package/cli/ws-bridge.ts +56 -14
  43. package/detox/index.ts +240 -18
  44. package/detox/launch-permissions.ts +183 -27
  45. package/dist-lib/agent-daemon-client.cjs +1 -1
  46. package/dist-lib/agent-events.cjs +1 -1
  47. package/dist-lib/attached-projects.cjs +1 -1
  48. package/dist-lib/auth/shared-session.cjs +1 -1
  49. package/dist-lib/backend-origin.cjs +10 -9
  50. package/dist-lib/beta.cjs +1 -1
  51. package/dist-lib/beta.mjs +1 -1
  52. package/dist-lib/bridge-constants.cjs +5 -1
  53. package/dist-lib/bridge-contract-input.cjs +1 -1
  54. package/dist-lib/bridge-contract-input.mjs +1 -1
  55. package/dist-lib/bridge-contract.cjs +1 -1
  56. package/dist-lib/bridge-contract.mjs +1 -1
  57. package/dist-lib/bundle-channel.cjs +38744 -32209
  58. package/dist-lib/capture-contract.cjs +1 -1
  59. package/dist-lib/capture-contract.mjs +1 -1
  60. package/dist-lib/cloud-contract.cjs +1 -1
  61. package/dist-lib/cloud-contract.mjs +1 -1
  62. package/dist-lib/cloud-test-args.cjs +1 -1
  63. package/dist-lib/cloud-test-args.mjs +1 -1
  64. package/dist-lib/cloud.cjs +2 -1
  65. package/dist-lib/cloud.mjs +2 -1
  66. package/dist-lib/config.cjs +1 -1
  67. package/dist-lib/config.mjs +1 -1
  68. package/dist-lib/detox/index.cjs +335 -70
  69. package/dist-lib/dev-bundle-resolution.cjs +15 -20
  70. package/dist-lib/expo-swift-bundle.cjs +22406 -23392
  71. package/dist-lib/expo-swift-metadata.cjs +4 -1
  72. package/dist-lib/expo-swift-metadata.mjs +3 -1
  73. package/dist-lib/home-paths.cjs +21 -2
  74. package/dist-lib/host/bridge-host.cjs +34611 -31375
  75. package/dist-lib/host/fetch-proxy-handler.cjs +475 -86
  76. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  77. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  78. package/dist-lib/host/replacement-module-handler.cjs +2 -1
  79. package/dist-lib/host/websocket-proxy.cjs +311 -45
  80. package/dist-lib/index.cjs +2509 -640
  81. package/dist-lib/jump-to-source-babel.cjs +1 -1
  82. package/dist-lib/jump-to-source-native.cjs +1 -1
  83. package/dist-lib/kotlin-host.cjs +127 -16
  84. package/dist-lib/menu.cjs +10 -1
  85. package/dist-lib/menu.mjs +9 -1
  86. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  87. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  88. package/dist-lib/metro-production-bundle.cjs +1 -1
  89. package/dist-lib/metro-production-bundle.mjs +1 -1
  90. package/dist-lib/metro.cjs +2340 -605
  91. package/dist-lib/native-app-identity-project.cjs +1277 -243
  92. package/dist-lib/native-app-identity-project.mjs +1287 -254
  93. package/dist-lib/native-app-identity.cjs +26 -2
  94. package/dist-lib/native-app-identity.mjs +24 -2
  95. package/dist-lib/native-firebase-metadata.cjs +1 -1
  96. package/dist-lib/native-firebase-metadata.mjs +1 -1
  97. package/dist-lib/plist.cjs +1 -1
  98. package/dist-lib/plist.mjs +1 -1
  99. package/dist-lib/profiles.cjs +1 -1
  100. package/dist-lib/public-brand.cjs +1 -1
  101. package/dist-lib/public-origins-lib-esm.json +36 -101
  102. package/dist-lib/public-origins-lib.json +478 -434
  103. package/dist-lib/react-native-host-modules.cjs +127 -3
  104. package/dist-lib/react-native-host-modules.mjs +126 -3
  105. package/dist-lib/reap-browser.cjs +12 -4
  106. package/dist-lib/scripts/dev-server-scanner.cjs +32 -50
  107. package/dist-lib/sdk.cjs +161 -24
  108. package/dist-lib/sdk.mjs +154 -24
  109. package/dist-lib/skills.cjs +44096 -28607
  110. package/dist-lib/swift-compile.cjs +6294 -16931
  111. package/dist-lib/swift-compile.mjs +6282 -16928
  112. package/dist-lib/swift-package.cjs +81 -3
  113. package/dist-lib/swift-package.mjs +77 -3
  114. package/dist-lib/swift-submit.cjs +14 -4
  115. package/dist-lib/swift-submit.mjs +14 -4
  116. package/dist-lib/swift-toolchain.cjs +108 -18
  117. package/dist-lib/swift.cjs +1 -1
  118. package/dist-lib/vite-swift.cjs +14434 -20336
  119. package/dist-lib/vite.cjs +558 -132
  120. package/dist-lib/worklet-executable.cjs +1 -1
  121. package/dist-lib/worklet-executable.mjs +1 -1
  122. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +17 -8
  123. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +2 -0
  124. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/capture/lockstep-clockContract.d.ts +1 -0
  126. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +1 -0
  127. package/dist-types/packages/peach-engine/src/engine/fiber-debug-metadata.d.ts +4 -0
  128. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
  129. package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +1 -0
  130. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +8 -4
  131. package/dist-types/packages/peach-engine/src/engine/lottie-types.d.ts +3 -0
  132. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +3 -1
  133. package/dist-types/packages/peach-engine/src/engine/node.d.ts +6 -14
  134. package/dist-types/packages/peach-engine/src/engine/riveContract.d.ts +5 -0
  135. package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -0
  136. package/dist-types/packages/peach-engine/src/guest-module-overrides.d.ts +3 -0
  137. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +2 -1
  138. package/dist-types/packages/peach-engine/src/permissions/system-permission-types.d.ts +2 -1
  139. package/dist-types/packages/peach-engine/src/react-native/host-services.d.ts +1 -0
  140. package/dist-types/packages/peach-engine/src/react-native/platform-colors.d.ts +1 -0
  141. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +6 -2
  142. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +4 -0
  143. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +25 -0
  144. package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +18 -2
  145. package/dist-types/packages/peach-engine/src/render-worker/live-frame-mirror.d.ts +11 -0
  146. package/dist-types/packages/peach-engine/src/render-worker/native-ui-commandContract.d.ts +1 -1
  147. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +10 -1
  148. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +10 -0
  149. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +9 -0
  150. package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +5 -0
  151. package/dist-types/packages/peach-engine/src/render-worker/tree-sync-port.d.ts +6 -1
  152. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime-kind.d.ts +5 -1
  153. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +29 -5
  154. package/dist-types/packages/peach-engine/src/render-worker/workletThreadIdentityContract.d.ts +4 -0
  155. package/dist-types/packages/peach-engine/src/shell-events.d.ts +1 -0
  156. package/dist-types/packages/peach-globals/src/audioBridgeContract.d.ts +5 -0
  157. package/dist-types/packages/peach-globals/src/guestExecutionContract.d.ts +30 -0
  158. package/dist-types/packages/peach-globals/src/index.d.ts +7 -5
  159. package/dist-types/packages/peach-globals/src/keyboardBridgeContract.d.ts +11 -0
  160. package/dist-types/packages/peach-globals/src/nativeBuildOptionsContract.d.ts +1 -0
  161. package/dist-types/packages/peach-globals/src/permissionsBridgeContract.d.ts +11 -0
  162. package/dist-types/packages/peach-globals/src/recordingBridgeContract.d.ts +22 -1
  163. package/dist-types/packages/peach-globals/src/sceneStreamBridgeContract.d.ts +10 -0
  164. package/dist-types/packages/peach-globals/src/shellBridgeContract.d.ts +1 -0
  165. package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +8 -2
  166. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +12 -2
  167. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
  168. package/package.json +3 -1
  169. package/runtime-companion.json +1 -1
  170. package/scripts/dev-server-scanner.ts +55 -81
  171. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASFoundation.h +52 -0
  172. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSession.h +128 -0
  173. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/ASWebAuthenticationSessionCallback.h +35 -0
  174. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Headers/AuthenticationServices.h +3 -0
  175. package/sdk/ios/System/Library/Frameworks/AuthenticationServices.framework/Modules/module.modulemap +5 -0
  176. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHTTPMessage.h +724 -0
  177. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +4 -0
  178. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkDefs.h +27 -0
  179. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Modules/module.modulemap +5 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBATTRequest.h +69 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAdvertisementData.h +94 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBAttribute.h +34 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentral.h +41 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManager.h +394 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCentralManagerConstants.h +224 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBCharacteristic.h +187 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDefines.h +16 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBDescriptor.h +78 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBError.h +75 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBL2CAPChannel.h +50 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBManager.h +88 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h +28 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheral.h +530 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManager.h +489 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeripheralManagerConstants.h +63 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBService.h +100 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBUUID.h +144 -0
  198. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.apinotes +7 -0
  199. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Headers/CoreBluetooth.h +32 -0
  200. package/sdk/ios/System/Library/Frameworks/CoreBluetooth.framework/Modules/module.modulemap +5 -0
  201. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCGTypes.h +131 -0
  202. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFURL.h +1301 -0
  203. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +8 -0
  204. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h +359 -2
  205. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h +328 -0
  206. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +3 -60
  207. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLLocationManager.h +21 -50
  208. package/sdk/ios/System/Library/Frameworks/CoreLocation.framework/Headers/CLRegion.h +6 -6
  209. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.apinotes +258 -0
  210. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/CoreNFC.h +31 -0
  211. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCError.h +103 -0
  212. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCFeliCaTag.h +267 -0
  213. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693ReaderSession.h +59 -0
  214. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO15693Tag.h +739 -0
  215. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCISO7816Tag.h +159 -0
  216. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCMiFareTag.h +94 -0
  217. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFMessage.h +60 -0
  218. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFPayload.h +121 -0
  219. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFReaderSession.h +169 -0
  220. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCNDEFTag.h +93 -0
  221. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCPaymentTagReaderSession.h +58 -0
  222. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCReaderSession.h +156 -0
  223. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTag.h +127 -0
  224. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCTagReaderSession.h +201 -0
  225. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NFCVASReaderSession.h +237 -0
  226. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Headers/NSUserActivity+CoreNFC.h +35 -0
  227. package/sdk/ios/System/Library/Frameworks/CoreNFC.framework/Modules/module.modulemap +21 -0
  228. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCall.h +53 -0
  229. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCallCenter.h +45 -0
  230. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCarrier.h +87 -0
  231. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularData.h +39 -0
  232. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProperties.h +46 -0
  233. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioning.h +33 -0
  234. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanProvisioningRequest.h +36 -0
  235. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTCellularPlanStatus.h +57 -0
  236. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTQuickSwitch.h +53 -0
  237. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriber.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTSubscriberInfo.h +34 -0
  239. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h +161 -0
  240. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Headers/CoreTelephonyDefines.h +39 -0
  241. package/sdk/ios/System/Library/Frameworks/CoreTelephony.framework/Modules/module.modulemap +5 -0
  242. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTDefines.h +92 -0
  243. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontDescriptor.h +634 -0
  244. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CTFontTraits.h +118 -0
  245. package/sdk/ios/System/Library/Frameworks/CoreText.framework/Headers/CoreText.h +1 -0
  246. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +2497 -0
  247. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2962 -367
  248. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAccessPoint.h +110 -0
  249. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievement.h +64 -0
  250. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementDescription.h +88 -0
  251. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKAchievementViewController.h +30 -0
  252. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKBasePlayer.h +15 -0
  253. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallenge.h +199 -0
  254. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeDefinition.h +71 -0
  255. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengeEventHandler.h +43 -0
  256. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKChallengesViewController.h +33 -0
  257. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKCloudPlayer.h +19 -0
  258. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDefines.h +17 -0
  259. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKDialogController.h +35 -0
  260. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKError.h +52 -0
  261. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKEventListener.h +36 -0
  262. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKFriendRequestComposeViewController.h +60 -0
  263. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivity.h +201 -0
  264. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityDefinition.h +98 -0
  265. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityListener.h +28 -0
  266. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityPlayStyle.h +17 -0
  267. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameActivityState.h +22 -0
  268. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameCenterViewController.h +102 -0
  269. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSession.h +87 -0
  270. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionError.h +26 -0
  271. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionEventListener.h +25 -0
  272. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKGameSessionSharingViewController.h +33 -0
  273. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboard.h +205 -0
  274. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardEntry.h +23 -0
  275. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardScore.h +25 -0
  276. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardSet.h +64 -0
  277. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLeaderboardViewController.h +34 -0
  278. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKLocalPlayer.h +321 -0
  279. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatch.h +94 -0
  280. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmaker.h +229 -0
  281. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKMatchmakerViewController.h +100 -0
  282. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKNotificationBanner.h +20 -0
  283. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPeerPickerController.h +93 -0
  284. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPlayer.h +82 -0
  285. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicConstants.h +57 -0
  286. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKPublicProtocols.h +71 -0
  287. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKReleaseState.h +16 -0
  288. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGame.h +41 -0
  289. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSavedGameListener.h +22 -0
  290. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKScore.h +73 -0
  291. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSession.h +87 -0
  292. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKSessionError.h +30 -0
  293. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatch.h +314 -0
  294. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKTurnBasedMatchmakerViewController.h +69 -0
  295. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChat.h +48 -0
  296. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GKVoiceChatService.h +145 -0
  297. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.apinotes +307 -0
  298. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Headers/GameKit.h +79 -0
  299. package/sdk/ios/System/Library/Frameworks/GameKit.framework/Modules/module.modulemap +6 -0
  300. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummary.h +122 -0
  301. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKActivitySummaryQuery.h +48 -0
  302. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAnchoredObjectQuery.h +93 -0
  303. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleSleepingBreathingDisturbancesClassification.h +39 -0
  304. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAppleWalkingSteadinessClassification.h +49 -0
  305. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachment.h +74 -0
  306. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAttachmentStore.h +95 -0
  307. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSample.h +66 -0
  308. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPoint.h +82 -0
  309. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityPointClampingRange.h +54 -0
  310. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKAudiogramSensitivityTest.h +101 -0
  311. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCDADocumentSample.h +131 -0
  312. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategorySample.h +92 -0
  313. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCategoryValues.h +279 -0
  314. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicObjects.h +79 -0
  315. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCharacteristicValues.h +87 -0
  316. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalCoding.h +55 -0
  317. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalRecord.h +53 -0
  318. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKClinicalType.h +68 -0
  319. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsLensSpecification.h +59 -0
  320. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKContactsPrescription.h +74 -0
  321. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelation.h +85 -0
  322. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCorrelationQuery.h +57 -0
  323. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySample.h +36 -0
  324. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKCumulativeQuantitySeriesSample.h +23 -0
  325. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDefines.h +114 -0
  326. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDeletedObject.h +40 -0
  327. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDevice.h +164 -0
  328. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDiscreteQuantitySample.h +67 -0
  329. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentQuery.h +83 -0
  330. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKDocumentSample.h +29 -0
  331. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogram.h +109 -0
  332. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKElectrocardiogramQuery.h +68 -0
  333. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRRelease.h +35 -0
  334. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRResource.h +81 -0
  335. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKFHIRVersion.h +50 -0
  336. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGAD7Assessment.h +73 -0
  337. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesLensSpecification.h +81 -0
  338. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKGlassesPrescription.h +66 -0
  339. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthConceptIdentifier.h +46 -0
  340. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHealthStore.h +470 -0
  341. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesBuilder.h +104 -0
  342. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesQuery.h +47 -0
  343. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKHeartbeatSeriesSample.h +26 -0
  344. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLensSpecification.h +53 -0
  345. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutBuilder.h +131 -0
  346. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutDataSource.h +67 -0
  347. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKLiveWorkoutZoneUpdate.h +25 -0
  348. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationConcept.h +95 -0
  349. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMedicationDoseEvent.h +113 -0
  350. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadata.h +583 -0
  351. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKMetadataEnums.h +250 -0
  352. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObject.h +64 -0
  353. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObjectType.h +294 -0
  354. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKObserverQuery.h +48 -0
  355. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKPHQ9Assessment.h +77 -0
  356. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantity.h +55 -0
  357. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantityAggregationStyle.h +30 -0
  358. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySample.h +83 -0
  359. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleBuilder.h +184 -0
  360. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuantitySeriesSampleQuery.h +90 -0
  361. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQuery.h +722 -0
  362. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryAnchor.h +33 -0
  363. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKQueryDescriptor.h +46 -0
  364. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSample.h +48 -0
  365. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSampleQuery.h +95 -0
  366. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKScoredAssessment.h +31 -0
  367. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesBuilder.h +40 -0
  368. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSeriesSample.h +32 -0
  369. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSource.h +45 -0
  370. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceQuery.h +42 -0
  371. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKSourceRevision.h +78 -0
  372. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStateOfMind.h +157 -0
  373. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatistics.h +166 -0
  374. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsCollectionQuery.h +80 -0
  375. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKStatisticsQuery.h +37 -0
  376. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKTypeIdentifiers.h +359 -0
  377. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUnit.h +287 -0
  378. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedication.h +60 -0
  379. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKUserAnnotatedMedicationQuery.h +38 -0
  380. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecord.h +131 -0
  381. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordQuery.h +76 -0
  382. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVerifiableClinicalRecordSubject.h +39 -0
  383. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrescription.h +76 -0
  384. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKVisionPrism.h +123 -0
  385. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkout.h +341 -0
  386. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivity.h +127 -0
  387. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutActivityType.h +147 -0
  388. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutBuilder.h +264 -0
  389. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutConfiguration.h +62 -0
  390. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutEffortRelationshipQuery.h +80 -0
  391. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRoute.h +20 -0
  392. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteBuilder.h +102 -0
  393. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutRouteQuery.h +67 -0
  394. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HKWorkoutSession.h +364 -0
  395. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.apinotes +5 -0
  396. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Headers/HealthKit.h +101 -0
  397. package/sdk/ios/System/Library/Frameworks/HealthKit.framework/Modules/module.modulemap +5 -0
  398. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAAudibleMedia.h +41 -0
  399. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MACaptionAppearance.h +406 -0
  400. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MADefinitions.h +38 -0
  401. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAFlashingLightsProcessing.h +53 -0
  402. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAImageCaptioning.h +55 -0
  403. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAMusicHaptics.h +69 -0
  404. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MAVideoAccommodations.h +34 -0
  405. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Headers/MediaAccessibility.h +14 -0
  406. package/sdk/ios/System/Library/Frameworks/MediaAccessibility.framework/Modules/module.modulemap +11 -0
  407. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyFlow.h +142 -0
  408. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProvider.h +93 -0
  409. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyProviderManager.h +40 -0
  410. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyTCPFlow.h +63 -0
  411. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppProxyUDPFlow.h +86 -0
  412. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushManager.h +208 -0
  413. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppPushProvider.h +87 -0
  414. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEAppRule.h +80 -0
  415. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyManager.h +109 -0
  416. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProvider.h +98 -0
  417. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSProxyProviderProtocol.h +45 -0
  418. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettings.h +124 -0
  419. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEDNSSettingsManager.h +116 -0
  420. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelNetworkSettings.h +45 -0
  421. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEEthernetTunnelProvider.h +31 -0
  422. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterControlProvider.h +80 -0
  423. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterDataProvider.h +235 -0
  424. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterFlow.h +177 -0
  425. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterManager.h +138 -0
  426. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterPacketProvider.h +99 -0
  427. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProvider.h +335 -0
  428. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterProviderConfiguration.h +94 -0
  429. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterRule.h +46 -0
  430. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFilterSettings.h +56 -0
  431. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEFlowMetaData.h +45 -0
  432. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotConfigurationManager.h +493 -0
  433. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotHelper.h +529 -0
  434. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEHotspotNetwork.h +87 -0
  435. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv4Settings.h +122 -0
  436. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEIPv6Settings.h +121 -0
  437. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NENetworkRule.h +218 -0
  438. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEOnDemandRule.h +210 -0
  439. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacket.h +67 -0
  440. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelFlow.h +62 -0
  441. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelNetworkSettings.h +135 -0
  442. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEPacketTunnelProvider.h +97 -0
  443. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProvider.h +160 -0
  444. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEProxySettings.h +140 -0
  445. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelay.h +83 -0
  446. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NERelayManager.h +195 -0
  447. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyManager.h +39 -0
  448. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyNetworkSettings.h +62 -0
  449. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETransparentProxyProvider.h +33 -0
  450. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelNetworkSettings.h +57 -0
  451. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProvider.h +113 -0
  452. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderManager.h +108 -0
  453. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderProtocol.h +44 -0
  454. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NETunnelProviderSession.h +55 -0
  455. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEURLFilter.h +51 -0
  456. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNConnection.h +162 -0
  457. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNManager.h +153 -0
  458. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocol.h +135 -0
  459. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIKEv2.h +357 -0
  460. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NEVPNProtocolIPSec.h +71 -0
  461. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWBonjourServiceEndpoint.h +82 -0
  462. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWEndpoint.h +40 -0
  463. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWHostEndpoint.h +68 -0
  464. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWPath.h +93 -0
  465. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTCPConnection.h +335 -0
  466. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWTLSParameters.h +70 -0
  467. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NWUDPSession.h +207 -0
  468. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.apinotes +351 -0
  469. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Headers/NetworkExtension.h +74 -0
  470. package/sdk/ios/System/Library/Frameworks/NetworkExtension.framework/Modules/module.modulemap +5 -0
  471. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h +84 -0
  472. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h +197 -0
  473. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h +428 -0
  474. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h +170 -0
  475. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h +50 -0
  476. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h +58 -0
  477. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h +356 -0
  478. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h +124 -0
  479. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h +431 -0
  480. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h +591 -0
  481. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h +101 -0
  482. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h +58 -0
  483. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h +56 -0
  484. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h +350 -0
  485. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h +349 -0
  486. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h +149 -0
  487. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h +79 -0
  488. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h +695 -0
  489. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h +727 -0
  490. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h +462 -0
  491. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h +219 -0
  492. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h +148 -0
  493. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h +34 -0
  494. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h +124 -0
  495. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h +58 -0
  496. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h +90 -0
  497. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h +80 -0
  498. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h +102 -0
  499. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h +250 -0
  500. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h +389 -0
  501. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h +348 -0
  502. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h +573 -0
  503. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h +84 -0
  504. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h +320 -0
  505. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h +64 -0
  506. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h +170 -0
  507. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes +423 -0
  508. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h +58 -0
  509. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitAvailability.h +10 -0
  510. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitDeprecated.h +88 -0
  511. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h +264 -0
  512. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal +75 -0
  513. package/sdk/ios/System/Library/Frameworks/SceneKit.framework/Modules/module.modulemap +12 -0
  514. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/CipherSuite.h +281 -0
  515. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecAccessControl.h +133 -0
  516. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecIdentity.h +232 -0
  517. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecKey.h +1616 -0
  518. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolMetadata.h +429 -0
  519. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolObject.h +71 -0
  520. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolOptions.h +775 -0
  521. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecProtocolTypes.h +327 -0
  522. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecRandom.h +84 -0
  523. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +9 -0
  524. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +12 -0
  525. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIInterface.h +23 -0
  526. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +26 -9
  527. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIOrientation.h +14 -0
  528. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIStringDrawing.h +12 -0
  529. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIView.h +14 -0
  530. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewAnimating.h +12 -0
  531. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIViewController.h +16 -0
  532. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIWindow.h +2 -0
  533. package/sdk/ios/usr/include/AvailabilityInternal.h +23 -0
  534. package/sdk/ios/usr/include/Block.h +56 -0
  535. package/sdk/ios/usr/include/CommonCrypto/CommonCrypto.h +34 -0
  536. package/sdk/ios/usr/include/CommonCrypto/CommonCryptoError.h +78 -0
  537. package/sdk/ios/usr/include/CommonCrypto/CommonCryptor.h +763 -0
  538. package/sdk/ios/usr/include/CommonCrypto/CommonDigest.h +254 -47
  539. package/sdk/ios/usr/include/CommonCrypto/CommonHMAC.h +162 -0
  540. package/sdk/ios/usr/include/CommonCrypto/CommonKeyDerivation.h +136 -0
  541. package/sdk/ios/usr/include/CommonCrypto/CommonRandom.h +63 -0
  542. package/sdk/ios/usr/include/CommonCrypto/CommonSymmetricKeywrap.h +162 -0
  543. package/sdk/ios/usr/include/CommonCrypto/module.modulemap +15 -0
  544. package/sdk/ios/usr/include/ConditionalMacros.h +619 -0
  545. package/sdk/ios/usr/include/ObjectiveC.apinotes +437 -0
  546. package/sdk/ios/usr/include/TargetConditionals.h +525 -14
  547. package/sdk/ios/usr/include/___wctype.h +193 -0
  548. package/sdk/ios/usr/include/__wctype.h +43 -0
  549. package/sdk/ios/usr/include/_abort.h +36 -0
  550. package/sdk/ios/usr/include/_assert.h +80 -0
  551. package/sdk/ios/usr/include/_static_assert.h +33 -0
  552. package/sdk/ios/usr/include/_stdlib.h +403 -0
  553. package/sdk/ios/usr/include/_string.h +231 -0
  554. package/sdk/ios/usr/include/_strings.h +101 -0
  555. package/sdk/ios/usr/include/_types/_wctrans_t.h +33 -0
  556. package/sdk/ios/usr/include/_types/_wctype_t.h +33 -0
  557. package/sdk/ios/usr/include/_wchar.h +263 -0
  558. package/sdk/ios/usr/include/_wctype.h +129 -0
  559. package/sdk/ios/usr/include/_xlocale.h +47 -0
  560. package/sdk/ios/usr/include/alloca.h +46 -0
  561. package/sdk/ios/usr/include/architecture/byte_order.h +381 -0
  562. package/sdk/ios/usr/include/arm/_limits.h +13 -0
  563. package/sdk/ios/usr/include/arm/arch.h +71 -0
  564. package/sdk/ios/usr/include/arm/limits.h +136 -0
  565. package/sdk/ios/usr/include/arpa/inet.h +100 -0
  566. package/sdk/ios/usr/include/assert.h +77 -10
  567. package/sdk/ios/usr/include/bsm/audit.h +434 -0
  568. package/sdk/ios/usr/include/crt_externs.h +50 -0
  569. package/sdk/ios/usr/include/dispatch/base.h +369 -0
  570. package/sdk/ios/usr/include/dispatch/block.h +509 -0
  571. package/sdk/ios/usr/include/dispatch/data.h +290 -0
  572. package/sdk/ios/usr/include/dispatch/dispatch.h +68 -172
  573. package/sdk/ios/usr/include/dispatch/dispatch_swift_shims.h +61 -0
  574. package/sdk/ios/usr/include/dispatch/group.h +289 -0
  575. package/sdk/ios/usr/include/dispatch/introspection.h +190 -0
  576. package/sdk/ios/usr/include/dispatch/io.h +617 -0
  577. package/sdk/ios/usr/include/dispatch/object.h +680 -0
  578. package/sdk/ios/usr/include/dispatch/once.h +128 -0
  579. package/sdk/ios/usr/include/dispatch/queue.h +1824 -0
  580. package/sdk/ios/usr/include/dispatch/semaphore.h +124 -0
  581. package/sdk/ios/usr/include/dispatch/source.h +803 -0
  582. package/sdk/ios/usr/include/dispatch/time.h +144 -0
  583. package/sdk/ios/usr/include/dispatch/workloop.h +178 -0
  584. package/sdk/ios/usr/include/dlfcn.h +320 -7
  585. package/sdk/ios/usr/include/execinfo.h +100 -10
  586. package/sdk/ios/usr/include/ftw.h +63 -0
  587. package/sdk/ios/usr/include/gethostuuid.h +45 -0
  588. package/sdk/ios/usr/include/libkern/arm/OSByteOrder.h +195 -0
  589. package/sdk/ios/usr/include/limits.h +167 -4
  590. package/sdk/ios/usr/include/mach/arm/boolean.h +74 -0
  591. package/sdk/ios/usr/include/mach/arm/exception.h +86 -0
  592. package/sdk/ios/usr/include/mach/arm/kern_return.h +78 -0
  593. package/sdk/ios/usr/include/mach/arm/processor_info.h +76 -0
  594. package/sdk/ios/usr/include/mach/arm/rpc.h +39 -0
  595. package/sdk/ios/usr/include/mach/arm/thread_state.h +42 -0
  596. package/sdk/ios/usr/include/mach/arm/thread_status.h +302 -0
  597. package/sdk/ios/usr/include/mach/arm/vm_param.h +118 -0
  598. package/sdk/ios/usr/include/mach/arm/vm_types.h +162 -0
  599. package/sdk/ios/usr/include/mach/boolean.h +88 -4
  600. package/sdk/ios/usr/include/mach/clock.h +249 -0
  601. package/sdk/ios/usr/include/mach/clock_priv.h +203 -0
  602. package/sdk/ios/usr/include/mach/clock_types.h +127 -0
  603. package/sdk/ios/usr/include/mach/dyld_kernel.h +66 -0
  604. package/sdk/ios/usr/include/mach/error.h +117 -0
  605. package/sdk/ios/usr/include/mach/exc.h +285 -0
  606. package/sdk/ios/usr/include/mach/exception_types.h +204 -25
  607. package/sdk/ios/usr/include/mach/host_info.h +136 -51
  608. package/sdk/ios/usr/include/mach/host_notify.h +39 -0
  609. package/sdk/ios/usr/include/mach/host_priv.h +1167 -0
  610. package/sdk/ios/usr/include/mach/host_security.h +225 -0
  611. package/sdk/ios/usr/include/mach/host_special_ports.h +315 -0
  612. package/sdk/ios/usr/include/mach/kern_return.h +291 -2
  613. package/sdk/ios/usr/include/mach/kmod.h +180 -0
  614. package/sdk/ios/usr/include/mach/mach.h +237 -12
  615. package/sdk/ios/usr/include/mach/mach_error.h +93 -10
  616. package/sdk/ios/usr/include/mach/mach_host.h +1329 -5
  617. package/sdk/ios/usr/include/mach/mach_init.h +112 -13
  618. package/sdk/ios/usr/include/mach/mach_interface.h +52 -0
  619. package/sdk/ios/usr/include/mach/mach_port.h +1935 -4
  620. package/sdk/ios/usr/include/mach/mach_time.h +77 -14
  621. package/sdk/ios/usr/include/mach/mach_traps.h +311 -0
  622. package/sdk/ios/usr/include/mach/mach_types.h +297 -20
  623. package/sdk/ios/usr/include/mach/mach_voucher_types.h +259 -0
  624. package/sdk/ios/usr/include/mach/machine/boolean.h +40 -0
  625. package/sdk/ios/usr/include/mach/machine/exception.h +40 -0
  626. package/sdk/ios/usr/include/mach/machine/kern_return.h +40 -0
  627. package/sdk/ios/usr/include/mach/machine/processor_info.h +40 -0
  628. package/sdk/ios/usr/include/mach/machine/rpc.h +40 -0
  629. package/sdk/ios/usr/include/mach/machine/thread_state.h +44 -0
  630. package/sdk/ios/usr/include/mach/machine/thread_status.h +40 -0
  631. package/sdk/ios/usr/include/mach/machine/vm_param.h +40 -0
  632. package/sdk/ios/usr/include/mach/machine/vm_types.h +40 -0
  633. package/sdk/ios/usr/include/mach/machine.h +456 -142
  634. package/sdk/ios/usr/include/mach/memory_object_types.h +312 -0
  635. package/sdk/ios/usr/include/mach/message.h +972 -0
  636. package/sdk/ios/usr/include/mach/mig.h +180 -0
  637. package/sdk/ios/usr/include/mach/mig_errors.h +125 -0
  638. package/sdk/ios/usr/include/mach/mig_strncpy_zerofill_support.h +35 -0
  639. package/sdk/ios/usr/include/mach/ndr.h +207 -0
  640. package/sdk/ios/usr/include/mach/notify.h +141 -0
  641. package/sdk/ios/usr/include/mach/policy.h +235 -0
  642. package/sdk/ios/usr/include/mach/port.h +648 -0
  643. package/sdk/ios/usr/include/mach/processor.h +364 -0
  644. package/sdk/ios/usr/include/mach/processor_info.h +171 -0
  645. package/sdk/ios/usr/include/mach/processor_set.h +589 -0
  646. package/sdk/ios/usr/include/mach/rpc.h +135 -0
  647. package/sdk/ios/usr/include/mach/semaphore.h +78 -0
  648. package/sdk/ios/usr/include/mach/std_types.h +75 -0
  649. package/sdk/ios/usr/include/mach/sync_policy.h +47 -0
  650. package/sdk/ios/usr/include/mach/task.h +2887 -7
  651. package/sdk/ios/usr/include/mach/task_info.h +584 -19
  652. package/sdk/ios/usr/include/mach/task_inspect.h +57 -0
  653. package/sdk/ios/usr/include/mach/task_policy.h +182 -26
  654. package/sdk/ios/usr/include/mach/task_special_ports.h +135 -0
  655. package/sdk/ios/usr/include/mach/thread_act.h +1550 -5
  656. package/sdk/ios/usr/include/mach/thread_info.h +206 -28
  657. package/sdk/ios/usr/include/mach/thread_policy.h +268 -0
  658. package/sdk/ios/usr/include/mach/thread_special_ports.h +87 -0
  659. package/sdk/ios/usr/include/mach/thread_status.h +100 -0
  660. package/sdk/ios/usr/include/mach/thread_switch.h +77 -0
  661. package/sdk/ios/usr/include/mach/time_value.h +96 -4
  662. package/sdk/ios/usr/include/mach/vm_attributes.h +99 -0
  663. package/sdk/ios/usr/include/mach/vm_behavior.h +86 -0
  664. package/sdk/ios/usr/include/mach/vm_inherit.h +93 -0
  665. package/sdk/ios/usr/include/mach/vm_map.h +1558 -0
  666. package/sdk/ios/usr/include/mach/vm_page_size.h +68 -0
  667. package/sdk/ios/usr/include/mach/vm_prot.h +183 -7
  668. package/sdk/ios/usr/include/mach/vm_purgable.h +166 -0
  669. package/sdk/ios/usr/include/mach/vm_region.h +400 -36
  670. package/sdk/ios/usr/include/mach/vm_statistics.h +387 -96
  671. package/sdk/ios/usr/include/mach/vm_sync.h +84 -0
  672. package/sdk/ios/usr/include/mach/vm_types.h +194 -7
  673. package/sdk/ios/usr/include/mach-o/arch.h +154 -16
  674. package/sdk/ios/usr/include/mach-o/fat.h +89 -0
  675. package/sdk/ios/usr/include/mach-o/getsect.h +146 -12
  676. package/sdk/ios/usr/include/mach-o/loader.h +1679 -139
  677. package/sdk/ios/usr/include/mach_debug/hash_info.h +75 -0
  678. package/sdk/ios/usr/include/mach_debug/ipc_info.h +199 -0
  679. package/sdk/ios/usr/include/mach_debug/lockgroup_info.h +74 -0
  680. package/sdk/ios/usr/include/mach_debug/mach_debug_types.h +200 -0
  681. package/sdk/ios/usr/include/mach_debug/page_info.h +64 -0
  682. package/sdk/ios/usr/include/mach_debug/vm_info.h +149 -0
  683. package/sdk/ios/usr/include/mach_debug/zone_info.h +209 -0
  684. package/sdk/ios/usr/include/machine/limits.h +14 -0
  685. package/sdk/ios/usr/include/module.modulemap +5 -0
  686. package/sdk/ios/usr/include/net/if_types.h +152 -0
  687. package/sdk/ios/usr/include/objc/NSObjCRuntime.h +10 -0
  688. package/sdk/ios/usr/include/objc/NSObject.h +23 -25
  689. package/sdk/ios/usr/include/objc/objc-api.h +310 -0
  690. package/sdk/ios/usr/include/objc/objc-sync.h +59 -0
  691. package/sdk/ios/usr/include/objc/objc.h +243 -0
  692. package/sdk/ios/usr/include/objc/runtime.h +1933 -0
  693. package/sdk/ios/usr/include/os.modulemap +11 -0
  694. package/sdk/ios/usr/include/pthread/pthread_impl.h +66 -0
  695. package/sdk/ios/usr/include/pthread/sched.h +46 -0
  696. package/sdk/ios/usr/include/pthread.h +754 -4
  697. package/sdk/ios/usr/include/pwd.h +119 -0
  698. package/sdk/ios/usr/include/sched.h +46 -0
  699. package/sdk/ios/usr/include/secure/_string.h +295 -0
  700. package/sdk/ios/usr/include/secure/_strings.h +96 -0
  701. package/sdk/ios/usr/include/spawn.h +193 -0
  702. package/sdk/ios/usr/include/stddef.h +90 -0
  703. package/sdk/ios/usr/include/stdlib.h +62 -17
  704. package/sdk/ios/usr/include/string.h +62 -8
  705. package/sdk/ios/usr/include/sys/_pthread/_pthread_cond_t.h +32 -0
  706. package/sdk/ios/usr/include/sys/_pthread/_pthread_condattr_t.h +32 -0
  707. package/sdk/ios/usr/include/sys/_pthread/_pthread_key_t.h +32 -0
  708. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutex_t.h +32 -0
  709. package/sdk/ios/usr/include/sys/_pthread/_pthread_mutexattr_t.h +32 -0
  710. package/sdk/ios/usr/include/sys/_pthread/_pthread_once_t.h +32 -0
  711. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlock_t.h +32 -0
  712. package/sdk/ios/usr/include/sys/_pthread/_pthread_rwlockattr_t.h +32 -0
  713. package/sdk/ios/usr/include/sys/_select.h +57 -0
  714. package/sdk/ios/usr/include/sys/_types/_blkcnt_t.h +32 -0
  715. package/sdk/ios/usr/include/sys/_types/_blksize_t.h +32 -0
  716. package/sdk/ios/usr/include/sys/_types/_caddr_t.h +32 -0
  717. package/sdk/ios/usr/include/sys/_types/_dev_t.h +32 -0
  718. package/sdk/ios/usr/include/sys/_types/_fsblkcnt_t.h +32 -0
  719. package/sdk/ios/usr/include/sys/_types/_fsfilcnt_t.h +32 -0
  720. package/sdk/ios/usr/include/sys/_types/_fsid_t.h +32 -0
  721. package/sdk/ios/usr/include/sys/_types/_fsobj_id_t.h +38 -0
  722. package/sdk/ios/usr/include/sys/_types/_graftdmg_un.h +64 -0
  723. package/sdk/ios/usr/include/sys/_types/_guid_t.h +37 -0
  724. package/sdk/ios/usr/include/sys/_types/_id_t.h +32 -0
  725. package/sdk/ios/usr/include/sys/_types/_ino64_t.h +32 -0
  726. package/sdk/ios/usr/include/sys/_types/_key_t.h +32 -0
  727. package/sdk/ios/usr/include/sys/_types/_mach_port_t.h +51 -0
  728. package/sdk/ios/usr/include/sys/_types/_mbstate_t.h +33 -0
  729. package/sdk/ios/usr/include/sys/_types/_mount_t.h +34 -0
  730. package/sdk/ios/usr/include/sys/_types/_nlink_t.h +32 -0
  731. package/sdk/ios/usr/include/sys/_types/_os_inline.h +34 -0
  732. package/sdk/ios/usr/include/sys/_types/_posix_vdisable.h +30 -0
  733. package/sdk/ios/usr/include/sys/_types/_rsize_t.h +55 -0
  734. package/sdk/ios/usr/include/sys/_types/_suseconds_t.h +32 -0
  735. package/sdk/ios/usr/include/sys/_types/_timeval.h +39 -0
  736. package/sdk/ios/usr/include/sys/_types/_u_char.h +31 -0
  737. package/sdk/ios/usr/include/sys/_types/_u_int.h +31 -0
  738. package/sdk/ios/usr/include/sys/_types/_u_short.h +31 -0
  739. package/sdk/ios/usr/include/sys/_types/_useconds_t.h +32 -0
  740. package/sdk/ios/usr/include/sys/_types/_uuid_t.h +32 -0
  741. package/sdk/ios/usr/include/sys/_types/_vnode_t.h +34 -0
  742. package/sdk/ios/usr/include/sys/acl.h +215 -0
  743. package/sdk/ios/usr/include/sys/attr.h +635 -0
  744. package/sdk/ios/usr/include/sys/cdefs.h +20 -0
  745. package/sdk/ios/usr/include/sys/event.h +388 -0
  746. package/sdk/ios/usr/include/sys/ioccom.h +99 -0
  747. package/sdk/ios/usr/include/sys/kauth.h +409 -0
  748. package/sdk/ios/usr/include/sys/mount.h +470 -0
  749. package/sdk/ios/usr/include/sys/queue.h +909 -0
  750. package/sdk/ios/usr/include/sys/resource.h +600 -0
  751. package/sdk/ios/usr/include/sys/select.h +134 -0
  752. package/sdk/ios/usr/include/sys/spawn.h +84 -0
  753. package/sdk/ios/usr/include/sys/sysctl.h +803 -57
  754. package/sdk/ios/usr/include/sys/syslimits.h +131 -11
  755. package/sdk/ios/usr/include/sys/syslog.h +236 -0
  756. package/sdk/ios/usr/include/sys/types.h +236 -19
  757. package/sdk/ios/usr/include/sys/ucred.h +116 -0
  758. package/sdk/ios/usr/include/sys/un.h +105 -0
  759. package/sdk/ios/usr/include/sys/unistd.h +225 -0
  760. package/sdk/ios/usr/include/sys/vm.h +89 -0
  761. package/sdk/ios/usr/include/sys/wait.h +256 -0
  762. package/sdk/ios/usr/include/sysdir.h +79 -0
  763. package/sdk/ios/usr/include/syslog.h +24 -0
  764. package/sdk/ios/usr/include/unistd.h +799 -3
  765. package/sdk/ios/usr/include/uuid/uuid.h +69 -10
  766. package/sdk/ios/usr/include/wchar.h +71 -0
  767. package/sdk/ios/usr/include/wctype.h +35 -0
  768. package/sdk/ios/usr/include/xlocale/___wctype.h +146 -0
  769. package/sdk/ios/usr/include/xlocale/_ctype.h +240 -0
  770. package/sdk/ios/usr/include/xlocale/_stdlib.h +77 -0
  771. package/sdk/ios/usr/include/xlocale/_string.h +43 -0
  772. package/sdk/ios/usr/include/xlocale/_wchar.h +160 -0
  773. package/sdk/ios/usr/include/xlocale/_wctype.h +100 -0
  774. package/sdk/ios/usr/include/xlocale.h +61 -0
  775. package/sdk/ios/usr/include/xpc/availability.h +141 -0
  776. package/sdk/ios/usr/include/xpc/base.h +243 -0
  777. package/sdk/ios/wasm/include/AvailabilityInternal.h +24 -0
  778. package/sdk/ios/wasm/include/TargetConditionals.h +529 -0
  779. package/sdk/ios/wasm/include/_locale.h +3 -0
  780. package/sdk/ios/wasm/include/_locale_posix2008.h +3 -0
  781. package/sdk/ios/wasm/include/_types/_locale_t.h +3 -0
  782. package/sdk/ios/wasm/include/arpa/inet.h +15 -0
  783. package/sdk/ios/wasm/include/dirent.h +52 -0
  784. package/sdk/ios/wasm/include/dlfcn.h +13 -1
  785. package/sdk/ios/wasm/include/errno.h +22 -0
  786. package/sdk/ios/wasm/include/fcntl.h +31 -0
  787. package/sdk/ios/wasm/include/ftw.h +15 -0
  788. package/sdk/ios/wasm/include/libkern/_OSByteOrder.h +6 -0
  789. package/sdk/ios/wasm/include/limits.h +9 -0
  790. package/sdk/ios/wasm/include/mach/machine/boolean.h +1 -1
  791. package/sdk/ios/wasm/include/mach/machine/exception.h +1 -4
  792. package/sdk/ios/wasm/include/mach/machine/kern_return.h +1 -1
  793. package/sdk/ios/wasm/include/mach/machine/processor_info.h +1 -1
  794. package/sdk/ios/wasm/include/mach/machine/rpc.h +1 -1
  795. package/sdk/ios/wasm/include/mach/machine/thread_state.h +1 -2
  796. package/sdk/ios/wasm/include/mach/machine/thread_status.h +1 -2
  797. package/sdk/ios/wasm/include/mach/machine/vm_param.h +1 -2
  798. package/sdk/ios/wasm/include/mach/machine/vm_types.h +1 -17
  799. package/sdk/ios/wasm/include/machine/_endian.h +2 -0
  800. package/sdk/ios/wasm/include/machine/_param.h +2 -0
  801. package/sdk/ios/wasm/include/machine/endian.h +1 -1
  802. package/sdk/ios/wasm/include/machine/limits.h +106 -2
  803. package/sdk/ios/wasm/include/machine/param.h +152 -0
  804. package/sdk/ios/wasm/include/netinet/in.h +11 -0
  805. package/sdk/ios/wasm/include/os/object.h +10 -0
  806. package/sdk/ios/wasm/include/pthread.h +14 -0
  807. package/sdk/ios/wasm/include/stdio.h +36 -0
  808. package/sdk/ios/wasm/include/stdlib.h +39 -1
  809. package/sdk/ios/wasm/include/strings.h +9 -0
  810. package/sdk/ios/wasm/include/sys/_types/_iovec_t.h +6 -0
  811. package/sdk/ios/wasm/include/sys/_types/_mode_t.h +10 -0
  812. package/sdk/ios/wasm/include/sys/file.h +7 -0
  813. package/sdk/ios/wasm/include/sys/ioctl.h +6 -0
  814. package/sdk/ios/wasm/include/sys/mman.h +2 -2
  815. package/sdk/ios/wasm/include/sys/param.h +4 -0
  816. package/sdk/ios/wasm/include/sys/resource.h +43 -0
  817. package/sdk/ios/wasm/include/sys/socket.h +75 -9
  818. package/sdk/ios/wasm/include/sys/stat.h +63 -0
  819. package/sdk/ios/wasm/include/sys/syscall.h +9 -0
  820. package/sdk/ios/wasm/include/sys/time.h +10 -0
  821. package/sdk/ios/wasm/include/sys/types.h +13 -0
  822. package/sdk/ios/wasm/include/sys/un.h +7 -0
  823. package/sdk/ios/wasm/include/time.h +3 -1
  824. package/sdk/ios/wasm/include/unistd.h +25 -3
  825. package/sdk/ios/wasm/include/xlocale/_stdlib.h +37 -0
  826. package/sdk/ios/wasm/storage-include/TargetConditionals.h +529 -0
  827. package/sdk/ios/wasm/storage-include/mach/machine/boolean.h +2 -0
  828. package/sdk/ios/wasm/storage-include/mach/machine/exception.h +5 -0
  829. package/sdk/ios/wasm/storage-include/mach/machine/kern_return.h +2 -0
  830. package/sdk/ios/wasm/storage-include/mach/machine/processor_info.h +2 -0
  831. package/sdk/ios/wasm/storage-include/mach/machine/rpc.h +2 -0
  832. package/sdk/ios/wasm/storage-include/mach/machine/thread_state.h +3 -0
  833. package/sdk/ios/wasm/storage-include/mach/machine/thread_status.h +3 -0
  834. package/sdk/ios/wasm/storage-include/mach/machine/vm_param.h +3 -0
  835. package/sdk/ios/wasm/storage-include/mach/machine/vm_types.h +18 -0
  836. package/sdk/ios/wasm/storage-include/machine/_endian.h +9 -0
  837. package/sdk/ios/wasm/storage-include/machine/_param.h +8 -0
  838. package/sdk/ios/wasm/storage-include/machine/_types.h +31 -0
  839. package/sdk/ios/wasm/storage-include/machine/endian.h +2 -0
  840. package/sdk/ios/wasm/storage-include/machine/limits.h +2 -0
  841. package/sdk/ios/wasm/storage-include/machine/types.h +15 -0
  842. package/sdk/native-hashes.json +81 -0
  843. package/skills/contrast/SKILL.md +3 -2
  844. package/skills/peach-test/SKILL.md +7 -3
  845. package/src/admitted-mac-build.ts +3 -0
  846. package/src/android-app-identity.ts +18 -0
  847. package/src/android-root-module.ts +145 -0
  848. package/src/androidRootModuleContract.ts +39 -0
  849. package/src/appPackageContract.ts +81 -0
  850. package/src/assetCatalogContract.ts +10 -1
  851. package/src/backend-origin.ts +11 -8
  852. package/src/bridge-constants.ts +7 -0
  853. package/src/bridge-contract.ts +53 -1
  854. package/src/bundle-channel.mjs +21 -4
  855. package/src/capture-contract.ts +3 -1
  856. package/src/cli-runtime.ts +6 -1
  857. package/src/dev-bundle-resolution.ts +7 -27
  858. package/src/device-catalog.ts +10 -4
  859. package/src/dom-source-reference.ts +15 -0
  860. package/src/expo-discovery-cache.ts +376 -0
  861. package/src/expo-manifest-body.ts +33 -0
  862. package/src/expo-native-workspace.ts +80 -24
  863. package/src/expo-swift-host.ts +905 -47
  864. package/src/expo-swift-ready.ts +43 -11
  865. package/src/expoSwiftContract.ts +3 -0
  866. package/src/generated/swift-c-predefines.json +1 -1
  867. package/src/home-paths.ts +35 -1
  868. package/src/host/app-package-handler.ts +47 -0
  869. package/src/host/bridge-host.ts +31 -0
  870. package/src/host/fetch-proxy-handler.ts +19 -1
  871. package/src/host/network-policy-proxy.ts +421 -0
  872. package/src/host/network-policy.ts +121 -0
  873. package/src/host/staged-host-files.ts +98 -3
  874. package/src/host/websocket-frame-guard.ts +163 -0
  875. package/src/host/websocket-proxy-headers.ts +29 -0
  876. package/src/host/websocket-proxy.ts +100 -58
  877. package/src/index.ts +3 -0
  878. package/src/installed-native-build-options.ts +154 -0
  879. package/src/installed-package-versions.ts +56 -49
  880. package/src/kotlin-host.ts +21 -18
  881. package/src/kotlin-instance-source.ts +126 -0
  882. package/src/material-symbol-fonts.ts +6 -4
  883. package/src/menu.ts +13 -0
  884. package/src/metro-plugin.ts +8 -0
  885. package/src/native-app-identity-project.ts +11 -2
  886. package/src/native-app-identity.ts +27 -0
  887. package/src/native-dev-bundle-url.ts +0 -18
  888. package/src/native-firebase-config.ts +71 -5
  889. package/src/native-preparation.ts +30 -0
  890. package/src/nativePreparationContract.ts +3 -0
  891. package/src/nitro-adapter.lock.json +382 -230
  892. package/src/nitro-bundle.ts +33 -1
  893. package/src/nitro-compile.ts +46 -7
  894. package/src/nitro-dependencies.ts +228 -0
  895. package/src/nitro-source.ts +191 -37
  896. package/src/nitroContract.ts +7 -0
  897. package/src/packageVersionsContract.ts +33 -0
  898. package/src/react-native-bridge-modules.ts +81 -32
  899. package/src/react-native-host-modules.ts +141 -4
  900. package/src/reactNativeConfigurationContract.ts +14 -0
  901. package/src/reap-browser.ts +15 -3
  902. package/src/runtime-assets.ts +10 -0
  903. package/src/sdk.ts +5 -0
  904. package/src/settingsContract.ts +27 -1
  905. package/src/sim-client.ts +5 -2
  906. package/src/storageSnapshotContract.ts +25 -10
  907. package/src/stub-pattern-matcher.ts +17 -4
  908. package/src/swift-compile.ts +1385 -4156
  909. package/src/swift-compiler-digest.ts +1 -2
  910. package/src/swift-coverage/package.ts +103 -58
  911. package/src/swift-coverage/provenance.ts +1 -0
  912. package/src/swift-coverage/xcode-asset-symbols.ts +922 -0
  913. package/src/swift-coverage/xcode-assets.ts +101 -123
  914. package/src/swift-coverage/xcode-bridging.ts +1 -12
  915. package/src/swift-coverage/xcode-packages.ts +167 -52
  916. package/src/swift-coverage/xcode.ts +3 -7
  917. package/src/swift-cxx-declarations.ts +205 -0
  918. package/src/swift-cxx-deps.ts +48 -0
  919. package/src/swift-cxx-reachable.ts +298 -0
  920. package/src/swift-cxx-standin.ts +248 -0
  921. package/src/swift-distribution.lock.json +26 -16
  922. package/src/swift-host.ts +308 -41
  923. package/src/swift-icu.ts +1 -1
  924. package/src/swift-link-roots.ts +118 -0
  925. package/src/swift-objc-compile.ts +752 -238
  926. package/src/swift-objc-import.ts +25 -964
  927. package/src/swift-objc-runtime.ts +7 -0
  928. package/src/swift-objc-standin.ts +264 -56
  929. package/src/swift-package-manifest.ts +190 -41
  930. package/src/swift-package.ts +123 -3
  931. package/src/swift-packages.ts +262 -39
  932. package/src/swift-pdf-raster.ts +115 -0
  933. package/src/swift-root-lock.ts +17 -1
  934. package/src/swift-shared-sdk.ts +45 -0
  935. package/src/swift-source-file.ts +10 -6
  936. package/src/swift-source-pods.ts +2 -10
  937. package/src/swift-standin-digest.ts +12 -15
  938. package/src/swift-standin-emit.ts +600 -57
  939. package/src/swift-standins.ts +679 -105
  940. package/src/swift-submit.ts +26 -6
  941. package/src/swift-toolchain.ts +143 -18
  942. package/src/swiftContract.ts +50 -29
  943. package/src/turbo-codegen-intake.ts +91 -0
  944. package/src/vite-plugin-one.ts +13 -9
  945. package/src/vite-plugin.ts +28 -28
  946. package/src/workspace-root.ts +15 -0
  947. package/src/xcode-json-project.ts +52 -1
  948. package/src/xcode-project.ts +509 -38
  949. package/src/swift-objc-export.ts +0 -532
  950. package/src/swift-objc-metadata.ts +0 -534
@@ -14,11 +14,11 @@
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
22
  #import <Security/Security.h>
23
23
 
24
24
  @class NSPropertyListSerialization;
@@ -62,23 +62,20 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
62
62
  #endif
63
63
  #endif
64
64
  #endif
65
- #define FOUNDATION_EXPORT extern
65
+ #if defined(__cplusplus)
66
+ #define FOUNDATION_EXTERN extern "C"
67
+ #else
66
68
  #define FOUNDATION_EXTERN extern
67
- #define __nullable _Nullable
68
- #define __nonnull _Nonnull
69
- #define __null_unspecified _Null_unspecified
69
+ #endif
70
+ #define FOUNDATION_EXPORT FOUNDATION_EXTERN
70
71
  #define FOUNDATION_STATIC_INLINE static inline
71
72
  #define NS_INLINE static inline
72
- #define CF_EXPORT extern
73
- #define OBJC_EXPORT extern
74
73
  #define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
75
74
  #define NS_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
76
75
  #define CF_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")
77
76
  #define CF_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end")
78
77
  #define NS_HEADER_AUDIT_BEGIN(...) _Pragma("clang assume_nonnull begin")
79
78
  #define NS_HEADER_AUDIT_END(...) _Pragma("clang assume_nonnull end")
80
- #define CF_EXTERN_C_BEGIN
81
- #define CF_EXTERN_C_END
82
79
  #include <sys/cdefs.h>
83
80
 
84
81
  #define NS_ENUM(...) CF_ENUM(__VA_ARGS__)
@@ -94,35 +91,27 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
94
91
  #endif
95
92
 
96
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:
97
-
94
+
98
95
  typedef NS_ERROR_ENUM(MyErrorDomain, SomeErrorCodes) {
99
96
  ...
100
97
  };
101
-
98
+
102
99
  If you do not specify a typedef name, do not use 'typedef', like so:
103
-
100
+
104
101
  NS_ERROR_ENUM(MyErrorDomain) {
105
102
  ...
106
103
  };
107
104
  */
108
105
  #define NS_ERROR_ENUM(...) __NS_ERROR_ENUM_GET_MACRO(__VA_ARGS__, __NS_NAMED_ERROR_ENUM, __NS_ANON_ERROR_ENUM)(__VA_ARGS__)
109
- #define NS_ENUM_AVAILABLE(...)
110
- #define NS_ENUM_AVAILABLE_IOS(...)
111
- #define NS_ENUM_DEPRECATED_IOS(...)
112
- #define NS_ENUM_DEPRECATED(...)
113
106
  #define _NS_TYPED_ENUM __attribute__((swift_wrapper(enum)))
114
107
  #define _NS_TYPED_EXTENSIBLE_ENUM __attribute__((swift_wrapper(struct)))
115
108
  #define NS_TYPED_ENUM _NS_TYPED_ENUM
116
109
  #define NS_TYPED_EXTENSIBLE_ENUM _NS_TYPED_EXTENSIBLE_ENUM
117
110
  #define NS_STRING_ENUM _NS_TYPED_ENUM
118
111
  #define NS_EXTENSIBLE_STRING_ENUM _NS_TYPED_EXTENSIBLE_ENUM
119
- #define CF_TYPED_ENUM _NS_TYPED_ENUM
120
- #define CF_TYPED_EXTENSIBLE_ENUM _NS_TYPED_EXTENSIBLE_ENUM
121
- #define CF_STRING_ENUM _NS_TYPED_ENUM
122
112
  #define NS_SWIFT_NAME(_name) __attribute__((swift_name(#_name)))
123
113
  #define CF_SWIFT_NAME(_name) __attribute__((swift_name(#_name)))
124
114
  #define NS_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
125
- #define CF_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
126
115
  #define NS_REFINED_FOR_SWIFT __attribute__((swift_private))
127
116
  #define CF_REFINED_FOR_SWIFT __attribute__((swift_private))
128
117
  #define NS_SWIFT_NOTHROW __attribute__((swift_error(none)))
@@ -140,13 +129,9 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
140
129
  #define NS_SWIFT_NONSENDABLE __attribute__((swift_attr("@_nonSendable")))
141
130
  #define NS_SWIFT_UNAVAILABLE_FROM_ASYNC(_msg)
142
131
  #define NS_SWIFT_BRIDGED_TYPEDEF __attribute__((swift_bridged_typedef))
143
- #define CF_SWIFT_BRIDGED_TYPEDEF __attribute__((swift_bridged_typedef))
144
132
  #define NS_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer))
145
133
  #define NS_UNAVAILABLE __attribute__((unavailable))
146
- #define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
147
134
  #define NS_AUTOMATED_REFCOUNT_UNAVAILABLE
148
- #define DEPRECATED_ATTRIBUTE __attribute__((deprecated))
149
- #define DEPRECATED_MSG_ATTRIBUTE(_msg) __attribute__((deprecated(_msg)))
150
135
  #define NS_REQUIRES_SUPER __attribute__((objc_requires_super))
151
136
  #define NS_REQUIRES_NIL_TERMINATION __attribute__((sentinel(0, 1)))
152
137
  #define NS_NOESCAPE __attribute__((noescape))
@@ -163,36 +148,54 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
163
148
  #define OBJC_ROOT_CLASS __attribute__((objc_root_class))
164
149
  #define NS_REQUIRES_PROPERTY_DEFINITIONS
165
150
  #define NS_SWIFT_SENDABLE_CLASS
166
- #define NS_CLASS_AVAILABLE(...)
167
- #define NS_CLASS_AVAILABLE_IOS(...)
168
- #define NS_CLASS_DEPRECATED_IOS(...)
169
- #define NS_AVAILABLE(_mac, _ios) __attribute__((availability(ios,introduced=_ios)))
170
- #define NS_AVAILABLE_IOS(...)
171
- #define NS_AVAILABLE_MAC(...)
172
- #define NS_DEPRECATED(...)
173
- #define NS_DEPRECATED_IOS(...)
174
- #define NS_DEPRECATED_MAC(...)
175
- #define NS_EXTENSION_UNAVAILABLE(...)
176
- #define NS_EXTENSION_UNAVAILABLE_IOS(...)
177
151
  #include <os/availability.h>
178
- #define __API_AVAILABLE(...)
179
- #define __API_UNAVAILABLE(...)
180
- #define __API_DEPRECATED(...)
181
- #define __OSX_AVAILABLE(...)
182
- #define __IOS_AVAILABLE(...)
183
- #define __TVOS_AVAILABLE(...)
184
- #define __WATCHOS_AVAILABLE(...)
185
- #define __IOS_PROHIBITED
186
- #define __TVOS_PROHIBITED
187
- #define __WATCHOS_PROHIBITED
188
- #define __OSX_AVAILABLE_STARTING(...)
189
- #define __OSX_AVAILABLE_BUT_DEPRECATED(...)
190
- #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
+
191
197
  #define OBJC_AVAILABLE(...)
192
198
  #define OBJC_SWIFT_UNAVAILABLE(_msg) __attribute__((availability(swift, unavailable, message=_msg)))
193
- #define CF_AVAILABLE(...)
194
- #define CF_AVAILABLE_IOS(...)
195
- #define CF_DEPRECATED(...)
196
199
  #define CF_BRIDGED_TYPE(_t) __attribute__((objc_bridge(_t)))
197
200
  #define CF_BRIDGED_MUTABLE_TYPE(_t) __attribute__((objc_bridge_mutable(_t)))
198
201
  #define CF_RELATED_TYPE(...)
@@ -207,17 +210,10 @@ typedef void NSUncaughtExceptionHandler(NSException * _Nonnull exception);
207
210
 
208
211
  NS_ASSUME_NONNULL_BEGIN
209
212
 
213
+ typedef struct _NSZone NSZone;
210
214
  typedef double NSTimeInterval NS_SWIFT_NAME(TimeInterval);
211
215
  #define NSTimeIntervalSince1970 978307200.0
212
216
  typedef uint16_t unichar;
213
- typedef NSUInteger NSStringEncoding;
214
- NS_ENUM(NSStringEncoding) {
215
- NSASCIIStringEncoding = 1,
216
- NSUTF8StringEncoding = 4,
217
- NSUnicodeStringEncoding = 10,
218
- NSUTF16StringEncoding = NSUnicodeStringEncoding,
219
- NSUTF16BigEndianStringEncoding = 0x90000100
220
- };
221
217
  typedef struct _NSRange { NSUInteger location; NSUInteger length; } NSRange;
222
218
  typedef NSRange *NSRangePointer;
223
219
  NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
@@ -226,32 +222,21 @@ NS_INLINE NSRange NSMakeRange(NSUInteger loc, NSUInteger len) {
226
222
  r.length = len;
227
223
  return r;
228
224
  }
229
- 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
+ };
230
233
  typedef NSComparisonResult (^NSComparator)(id obj1, id obj2);
231
234
  typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) { NSEnumerationConcurrent = (1UL << 0), NSEnumerationReverse = (1UL << 1) };
232
- typedef NS_OPTIONS(NSUInteger, NSStringCompareOptions) {
233
- NSCaseInsensitiveSearch = 1,
234
- NSLiteralSearch = 2,
235
- NSBackwardsSearch = 4,
236
- NSAnchoredSearch = 8,
237
- NSNumericSearch = 64,
238
- NSDiacriticInsensitiveSearch __attribute__((availability(ios,introduced=2.0))) = 128,
239
- NSWidthInsensitiveSearch __attribute__((availability(ios,introduced=2.0))) = 256,
240
- NSForcedOrderingSearch __attribute__((availability(ios,introduced=2.0))) = 512,
241
- NSRegularExpressionSearch __attribute__((availability(ios,introduced=3.2))) = 1024
242
- };
243
235
  typedef NS_OPTIONS(NSUInteger, NSSortOptions) { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4) };
244
236
  typedef NS_ENUM(NSInteger, NSQualityOfService) { NSQualityOfServiceUserInteractive = 0x21, NSQualityOfServiceUserInitiated = 0x19, NSQualityOfServiceUtility = 0x11, NSQualityOfServiceBackground = 0x09, NSQualityOfServiceDefault = -1 } NS_SWIFT_NAME(QualityOfService);
245
237
 
246
- @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;
247
239
 
248
- typedef struct _NSZone NSZone;
249
- @protocol NSCopying
250
- - (id)copyWithZone:(nullable struct _NSZone *)zone;
251
- @end
252
- @protocol NSMutableCopying
253
- - (id)mutableCopyWithZone:(nullable struct _NSZone *)zone;
254
- @end
255
240
  @protocol NSCoding
256
241
  - (void)encodeWithCoder:(NSCoder *)coder;
257
242
  - (nullable instancetype)initWithCoder:(NSCoder *)coder;
@@ -264,75 +249,511 @@ typedef struct { unsigned long state; id __unsafe_unretained _Nullable * _Nullab
264
249
  - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id __unsafe_unretained _Nullable [_Nonnull])buffer count:(NSUInteger)len;
265
250
  @end
266
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
+
267
332
  __attribute__((swift_bridge("Swift.String")))
268
333
  @interface NSString : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
269
- - (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)));
270
- @property (readonly) double doubleValue;
271
- - (BOOL)canBeConvertedToEncoding:(NSStringEncoding)encoding;
334
+
272
335
  @property (readonly) NSUInteger length;
273
- @property (readonly) NSInteger integerValue;
274
- @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER;
275
- @property (nullable, readonly) const char *UTF8String NS_RETURNS_INNER_POINTER;
276
- @property (nullable, readonly, copy) NSString *stringByRemovingPercentEncoding;
277
- @property (readonly) BOOL boolValue __attribute__((availability(ios,introduced=2.0)));
278
- @property (readonly) int intValue;
279
- - (nullable const char *)cStringUsingEncoding:(NSStringEncoding)encoding NS_RETURNS_INNER_POINTER;
280
- + (nullable instancetype)stringWithCString:(const char *)cString encoding:(NSStringEncoding)enc NS_FORMAT_ARGUMENT(1);
281
- - (NSComparisonResult)localizedStandardCompare:(NSString *)string __attribute__((availability(ios,introduced=4.0)));
336
+
282
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
+
283
369
  - (BOOL)isEqualToString:(NSString *)aString;
284
- - (BOOL)containsString:(NSString *)str;
370
+
285
371
  - (BOOL)hasPrefix:(NSString *)str;
372
+
286
373
  - (BOOL)hasSuffix:(NSString *)str;
287
- - (NSString *)substringToIndex:(NSUInteger)to;
288
- - (NSString *)stringByAppendingFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
289
- @property (readonly, copy) NSString *stringByDeletingPathExtension;
290
- @property (readonly, copy) NSString *pathExtension;
291
- - (nullable NSString *)stringByAppendingPathExtension:(NSString *)str;
292
- @property (readonly, copy) NSString *stringByDeletingLastPathComponent;
293
- - (nullable instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer;
294
- - (instancetype)initWithFormat:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(1,0);
295
- @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
+
296
385
  - (NSRange)rangeOfString:(NSString *)searchString;
386
+
297
387
  - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask;
388
+
298
389
  - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
299
- - (NSRange)rangeOfString:(NSString *)searchString options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch locale:(nullable NSLocale *)locale __attribute__((availability(ios,introduced=2.0)));
300
- @property (readonly, copy) NSString *lowercaseString;
301
- @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
+
302
393
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet;
394
+
303
395
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask;
396
+
304
397
  - (NSRange)rangeOfCharacterFromSet:(NSCharacterSet *)searchSet options:(NSStringCompareOptions)mask range:(NSRange)rangeOfReceiverToSearch;
305
- + (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
+
306
403
  - (NSString *)stringByAppendingString:(NSString *)aString;
307
- - (NSString *)stringByReplacingOccurrencesOfString:(NSString *)target withString:(NSString *)replacement;
308
- - (instancetype)initWithString:(NSString *)aString NS_FORMAT_ARGUMENT(1);
309
- - (instancetype)initWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
310
- + (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
+
311
499
  - (NSArray<NSString *> *)componentsSeparatedByString:(NSString *)separator;
312
- - (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
+
313
575
  - (nullable instancetype)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding;
314
- - (nullable NSData *)dataUsingEncoding:(NSStringEncoding)encoding;
576
+
315
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
+
316
588
  + (nullable instancetype)stringWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
317
- + (instancetype)stringWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2);
318
- - (instancetype)init NS_DESIGNATED_INITIALIZER;
319
- - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
320
- @end
321
- @interface NSString (NSURLUtilities)
322
- - (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
+
323
612
  @end
324
- @interface NSString (NSStringExtensionMethods)
325
- - (NSComparisonResult)compare:(NSString *)string options:(NSStringCompareOptions)mask;
326
- @property (readonly) float floatValue;
327
- - (nullable instancetype)initWithUTF8String:(const char *)nullTerminatedCString NS_FORMAT_ARGUMENT(1);
328
- - (NSString *)substringFromIndex:(NSUInteger)from;
329
- - (NSString *)substringWithRange:(NSRange)range;
330
- - (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
+
331
638
  @end
639
+ #endif
640
+
332
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
+
333
653
  - (void)appendString:(NSString *)aString;
334
- - (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
+
335
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);
336
757
  @end
337
758
  NS_SWIFT_UNAVAILABLE("Use String or NSString instead.")
338
759
  @interface NSSimpleCString : NSString {
@@ -356,127 +777,354 @@ typedef NSString *NSAttributedStringKey NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(N
356
777
 
357
778
  __attribute__((swift_bridge("Swift.Array")))
358
779
  @interface NSArray<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
359
- - (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray;
360
- - (NSUInteger)indexOfObjectIdenticalTo:(ObjectType)anObject;
361
- + (instancetype)arrayWithObject:(ObjectType)anObject;
362
- - (NSEnumerator<ObjectType> *)reverseObjectEnumerator;
363
780
  @property (readonly) NSUInteger count;
364
- @property (nullable, nonatomic, readonly) ObjectType firstObject;
365
- @property (nullable, nonatomic, readonly) ObjectType lastObject;
366
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;
367
789
  - (NSString *)componentsJoinedByString:(NSString *)separator;
368
- - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx;
369
790
  - (BOOL)containsObject:(ObjectType)anObject;
370
- - (NSArray<ObjectType> *)subarrayWithRange:(NSRange)range;
371
- - (NSArray<ObjectType> *)sortedArrayUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
372
- - (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;
373
803
  - (NSEnumerator<ObjectType> *)objectEnumerator;
374
- - (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)
375
834
  + (instancetype)array;
835
+ + (instancetype)arrayWithObject:(ObjectType)anObject;
376
836
  + (instancetype)arrayWithObjects:(const ObjectType _Nonnull [_Nonnull])objects count:(NSUInteger)cnt;
377
- + (instancetype)arrayWithArray:(NSArray<ObjectType> *)array;
378
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;
379
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");
380
844
  @end
381
- @interface NSArray<ObjectType> (NSExtendedArray)
382
- - (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));
383
853
  @end
384
854
  @interface NSMutableArray<ObjectType> : NSArray<ObjectType>
385
- - (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)));
386
- - (void)removeObjectIdenticalTo:(ObjectType)anObject;
387
- - (void)removeObjectIdenticalTo:(ObjectType)anObject inRange:(NSRange)range;
388
- + (instancetype)arrayWithCapacity:(NSUInteger)numItems;
389
- - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
390
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)
391
865
  - (void)addObjectsFromArray:(NSArray<ObjectType> *)otherArray;
392
- - (void)removeObject:(ObjectType)anObject;
866
+ - (void)exchangeObjectAtIndex:(NSUInteger)idx1 withObjectAtIndex:(NSUInteger)idx2;
393
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));
394
873
  - (void)removeObjectsInArray:(NSArray<ObjectType> *)otherArray;
395
- - (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;
396
879
  - (void)sortUsingSelector:(SEL)comparator;
397
- - (void)sortUsingComparator:(NSComparator NS_NOESCAPE)cmptr;
398
- - (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;
399
893
  @end
400
894
  __attribute__((swift_bridge("Swift.Dictionary")))
401
895
  @interface NSDictionary<__covariant KeyType, __covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
402
- - (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)));
403
- - (BOOL)isEqualToDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
404
896
  @property (readonly) NSUInteger count;
405
897
  - (nullable ObjectType)objectForKey:(KeyType)aKey;
406
- - (nullable ObjectType)objectForKeyedSubscript:(KeyType)key;
407
- - (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)
408
904
  @property (readonly, copy) NSArray<KeyType> *allKeys;
905
+ - (NSArray<KeyType> *)allKeysForObject:(ObjectType)anObject;
409
906
  @property (readonly, copy) NSArray<ObjectType> *allValues;
410
- - (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;
411
912
  - (NSEnumerator<ObjectType> *)objectEnumerator;
412
913
  - (NSArray<ObjectType> *)objectsForKeys:(NSArray<KeyType> *)keys notFoundMarker:(ObjectType)marker;
413
- - (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)
414
935
  + (instancetype)dictionary;
415
- + (instancetype)dictionaryWithDictionary:(NSDictionary<KeyType, ObjectType> *)dict;
416
- - (instancetype)initWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION;
417
- - (instancetype)initWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
418
936
  + (instancetype)dictionaryWithObject:(ObjectType)object forKey:(KeyType <NSCopying>)key;
419
937
  + (instancetype)dictionaryWithObjects:(const ObjectType _Nonnull [_Nullable])objects forKeys:(const KeyType <NSCopying> _Nonnull [_Nullable])keys count:(NSUInteger)cnt;
420
- + (instancetype)dictionaryWithObjects:(NSArray<ObjectType> *)objects forKeys:(NSArray<KeyType <NSCopying>> *)keys;
421
- @end
422
- @interface NSDictionary<KeyType, ObjectType> (NSDictionaryCreation)
423
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;
424
941
  - (instancetype)initWithObjectsAndKeys:(id)firstObject, ... NS_REQUIRES_NIL_TERMINATION;
425
- @end
426
- @interface NSDictionary<KeyType, ObjectType> (NSKeyValueCoding)
427
- - (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");
428
947
  @end
429
948
  @interface NSMutableDictionary<KeyType, ObjectType> : NSDictionary<KeyType, ObjectType>
430
949
  - (void)removeObjectForKey:(KeyType)aKey;
431
- - (void)addEntriesFromDictionary:(NSDictionary<KeyType, ObjectType> *)otherDictionary;
432
- - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
433
- + (instancetype)dictionaryWithCapacity:(NSUInteger)numItems;
434
950
  - (void)setObject:(ObjectType)anObject forKey:(KeyType <NSCopying>)aKey;
435
- - (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;
436
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;
437
983
  @end
438
984
  __attribute__((swift_bridge("Swift.Set")))
439
985
  @interface NSSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
440
986
  @property (readonly) NSUInteger count;
441
- + (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;
442
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;
443
1002
  - (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE("Use enumerateObjectsUsingBlock: or a for loop instead");
444
- - (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));
445
1011
  @end
446
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;
447
1017
  + (instancetype)setWithArray:(NSArray<ObjectType> *)array;
448
- @end
449
- @interface NSSet<ObjectType> (NSExtendedSet)
450
- - (BOOL)containsObject:(ObjectType)anObject;
451
- - (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;
452
1021
  @end
453
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;
454
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;
455
1046
  - (void)addObject:(ObjectType)object;
456
1047
  - (void)removeObject:(ObjectType)object;
457
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
458
1053
  @interface NSOrderedSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>
1054
+ @property (readonly) NSUInteger count;
1055
+ - (ObjectType)objectAtIndex:(NSUInteger)idx;
1056
+ - (NSUInteger)indexOfObject:(ObjectType)object;
1057
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1058
+ - (instancetype)initWithObjects:(const ObjectType _Nonnull [_Nullable])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;
1059
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1060
+ - (ObjectType)objectAtIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
459
1061
  @end
460
1062
  @interface NSMutableOrderedSet<ObjectType> : NSOrderedSet<ObjectType>
1063
+ - (void)insertObject:(ObjectType)object atIndex:(NSUInteger)idx;
1064
+ - (void)removeObjectAtIndex:(NSUInteger)idx;
1065
+ - (void)replaceObjectAtIndex:(NSUInteger)idx withObject:(ObjectType)object;
1066
+ - (void)setObject:(ObjectType)obj atIndexedSubscript:(NSUInteger)idx API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
1067
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1068
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1069
+ - (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;
1070
+ @end
1071
+ @interface NSMutableOrderedSet<ObjectType> (NSExtendedMutableOrderedSet)
1072
+ - (void)addObject:(ObjectType)object;
1073
+ - (void)addObjectsFromArray:(NSArray<ObjectType> *)array;
1074
+ - (void)removeAllObjects;
1075
+ @end
1076
+ @interface NSOrderedSet<ObjectType> (NSOrderedSetCreation)
1077
+ - (instancetype)initWithObject:(ObjectType)object;
1078
+ - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set;
1079
+ - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set copyItems:(BOOL)flag;
1080
+ - (instancetype)initWithOrderedSet:(NSOrderedSet<ObjectType> *)set range:(NSRange)range copyItems:(BOOL)flag;
1081
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array;
1082
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array copyItems:(BOOL)flag;
1083
+ - (instancetype)initWithArray:(NSArray<ObjectType> *)array range:(NSRange)range copyItems:(BOOL)flag;
1084
+ - (instancetype)initWithSet:(NSSet<ObjectType> *)set;
1085
+ - (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag;
461
1086
  @end
462
1087
  @interface NSEnumerator<ObjectType> : NSObject <NSFastEnumeration>
463
- @property (readonly, copy) NSArray<ObjectType> *allObjects;
464
1088
  - (nullable ObjectType)nextObject;
465
1089
  @end
1090
+ @interface NSEnumerator<ObjectType> (NSExtendedEnumerator)
1091
+ @property (readonly, copy) NSArray<ObjectType> *allObjects;
1092
+ @end
466
1093
  @interface NSValue : NSObject <NSCopying, NSSecureCoding>
1094
+ - (void)getValue:(void *)value size:(NSUInteger)size API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
467
1095
  @property (readonly) const char *objCType NS_RETURNS_INNER_POINTER;
468
- @property (nullable, readonly) void *pointerValue;
469
- - (void)getValue:(void *)value;
1096
+ - (instancetype)initWithBytes:(const void *)value objCType:(const char *)type NS_DESIGNATED_INITIALIZER;
1097
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1098
+ @end
1099
+ @interface NSValue (NSValueCreation)
1100
+ + (NSValue *)valueWithBytes:(const void *)value objCType:(const char *)type;
1101
+ + (NSValue *)value:(const void *)value withObjCType:(const char *)type;
1102
+ @end
1103
+ @interface NSValue (NSValueExtensionMethods)
470
1104
  + (NSValue *)valueWithNonretainedObject:(nullable id)anObject;
1105
+ @property (nullable, readonly) id nonretainedObjectValue;
1106
+ + (NSValue *)valueWithPointer:(nullable const void *)pointer;
1107
+ @property (nullable, readonly) void *pointerValue;
1108
+ - (BOOL)isEqualToValue:(NSValue *)value;
471
1109
  @end
1110
+ NS_SWIFT_SENDABLE
472
1111
  @interface NSNumber : NSValue
473
- @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)));
474
- @property (readonly) BOOL boolValue;
475
- - (NSComparisonResult)compare:(NSNumber *)otherNumber;
476
- - (BOOL)isEqualToNumber:(NSNumber *)number;
477
- @property (readonly, copy) NSString *stringValue;
478
- @property (readonly) NSInteger integerValue;
479
- @property (readonly) double doubleValue;
1112
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1113
+ - (NSNumber *)initWithChar:(char)value NS_DESIGNATED_INITIALIZER;
1114
+ - (NSNumber *)initWithUnsignedChar:(unsigned char)value NS_DESIGNATED_INITIALIZER;
1115
+ - (NSNumber *)initWithShort:(short)value NS_DESIGNATED_INITIALIZER;
1116
+ - (NSNumber *)initWithUnsignedShort:(unsigned short)value NS_DESIGNATED_INITIALIZER;
1117
+ - (NSNumber *)initWithInt:(int)value NS_DESIGNATED_INITIALIZER;
1118
+ - (NSNumber *)initWithUnsignedInt:(unsigned int)value NS_DESIGNATED_INITIALIZER;
1119
+ - (NSNumber *)initWithLong:(long)value NS_DESIGNATED_INITIALIZER;
1120
+ - (NSNumber *)initWithUnsignedLong:(unsigned long)value NS_DESIGNATED_INITIALIZER;
1121
+ - (NSNumber *)initWithLongLong:(long long)value NS_DESIGNATED_INITIALIZER;
1122
+ - (NSNumber *)initWithUnsignedLongLong:(unsigned long long)value NS_DESIGNATED_INITIALIZER;
1123
+ - (NSNumber *)initWithFloat:(float)value NS_DESIGNATED_INITIALIZER;
1124
+ - (NSNumber *)initWithDouble:(double)value NS_DESIGNATED_INITIALIZER;
1125
+ - (NSNumber *)initWithBool:(BOOL)value NS_DESIGNATED_INITIALIZER;
1126
+ - (NSNumber *)initWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1127
+ - (NSNumber *)initWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
480
1128
  @property (readonly) char charValue;
481
1129
  @property (readonly) unsigned char unsignedCharValue;
482
1130
  @property (readonly) short shortValue;
@@ -488,6 +1136,16 @@ __attribute__((swift_bridge("Swift.Set")))
488
1136
  @property (readonly) long long longLongValue;
489
1137
  @property (readonly) unsigned long long unsignedLongLongValue;
490
1138
  @property (readonly) float floatValue;
1139
+ @property (readonly) double doubleValue;
1140
+ @property (readonly) BOOL boolValue;
1141
+ @property (readonly) NSInteger integerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1142
+ @property (readonly) NSUInteger unsignedIntegerValue API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1143
+ @property (readonly, copy) NSString *stringValue;
1144
+ - (NSComparisonResult)compare:(NSNumber *)otherNumber;
1145
+ - (BOOL)isEqualToNumber:(NSNumber *)number;
1146
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
1147
+ @end
1148
+ @interface NSNumber (NSNumberCreation)
491
1149
  + (NSNumber *)numberWithChar:(char)value;
492
1150
  + (NSNumber *)numberWithUnsignedChar:(unsigned char)value;
493
1151
  + (NSNumber *)numberWithShort:(short)value;
@@ -501,124 +1159,411 @@ __attribute__((swift_bridge("Swift.Set")))
501
1159
  + (NSNumber *)numberWithFloat:(float)value;
502
1160
  + (NSNumber *)numberWithDouble:(double)value;
503
1161
  + (NSNumber *)numberWithBool:(BOOL)value;
504
- + (NSNumber *)numberWithInteger:(NSInteger)value;
505
- + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value;
506
- - (NSNumber *)initWithLongLong:(long long)value NS_DESIGNATED_INITIALIZER;
1162
+ + (NSNumber *)numberWithInteger:(NSInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1163
+ + (NSNumber *)numberWithUnsignedInteger:(NSUInteger)value API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1164
+ @end
1165
+ @interface NSValue (NSDeprecated)
1166
+ - (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));
507
1167
  @end
508
1168
  __attribute__((swift_bridge("Decimal")))
509
1169
  @interface NSDecimalNumber : NSNumber
510
1170
  @end
1171
+ typedef NS_ENUM(NSUInteger, NSRoundingMode) {
1172
+ NSRoundPlain,
1173
+ NSRoundDown,
1174
+ NSRoundUp,
1175
+ NSRoundBankers
1176
+ } NS_SWIFT_NAME(NSDecimalNumber.RoundingMode);
1177
+ typedef NS_ENUM(NSUInteger, NSCalculationError) {
1178
+ NSCalculationNoError = 0,
1179
+ NSCalculationLossOfPrecision,
1180
+ NSCalculationUnderflow,
1181
+ NSCalculationOverflow,
1182
+ NSCalculationDivideByZero
1183
+ } NS_SWIFT_NAME(NSDecimalNumber.CalculationError);
1184
+ #define NSDecimalMaxSize (8)
1185
+ #define NSDecimalNoScale SHRT_MAX
1186
+ typedef struct NS_SWIFT_SENDABLE {
1187
+ signed int _exponent:8;
1188
+ unsigned int _length:4;
1189
+ unsigned int _isNegative:1;
1190
+ unsigned int _isCompact:1;
1191
+ unsigned int _reserved:18;
1192
+ unsigned short _mantissa[NSDecimalMaxSize];
1193
+ } NSDecimal NS_SWIFT_NAME(Decimal);
511
1194
  @interface NSNull : NSObject <NSCopying, NSSecureCoding>
512
1195
  + (NSNull *)null;
513
1196
  @end
514
1197
  typedef NS_OPTIONS(NSUInteger, NSDataReadingOptions) {
515
1198
  NSDataReadingMappedIfSafe = 1UL << 0,
516
1199
  NSDataReadingUncached = 1UL << 1,
517
- NSDataReadingMappedAlways = 1UL << 3,
518
- NSDataReadingMapped = NSDataReadingMappedIfSafe,
519
- NSMappedRead = NSDataReadingMapped,
520
- NSUncachedRead = NSDataReadingUncached
1200
+ NSDataReadingMappedAlways API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = 1UL << 3,
1201
+ 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,
1202
+ 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,
1203
+ 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
521
1204
  };
522
1205
  typedef NS_OPTIONS(NSUInteger, NSDataWritingOptions) {
523
1206
  NSDataWritingAtomic = 1UL << 0,
524
- NSDataWritingWithoutOverwriting = 1UL << 1,
525
- NSDataWritingFileProtectionNone = 0x10000000,
526
- NSDataWritingFileProtectionComplete = 0x20000000,
527
- NSDataWritingFileProtectionCompleteUnlessOpen = 0x30000000,
528
- NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = 0x40000000,
529
- NSDataWritingFileProtectionCompleteWhenUserInactive = 0x50000000,
530
- NSDataWritingFileProtectionMask = 0xf0000000,
531
- NSAtomicWrite = NSDataWritingAtomic
1207
+ NSDataWritingWithoutOverwriting API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0)) = 1UL << 1,
1208
+ NSDataWritingFileProtectionNone API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x10000000,
1209
+ NSDataWritingFileProtectionComplete API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0x20000000,
1210
+ NSDataWritingFileProtectionCompleteUnlessOpen API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x30000000,
1211
+ NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication API_AVAILABLE(macos(11.0), ios(5.0), watchos(2.0), tvos(9.0)) = 0x40000000,
1212
+ NSDataWritingFileProtectionCompleteWhenUserInactive API_AVAILABLE(ios(17.0), watchos(10.0), tvos(17.0)) API_UNAVAILABLE(macos) = 0x50000000,
1213
+ NSDataWritingFileProtectionMask API_AVAILABLE(macos(11.0), ios(4.0), watchos(2.0), tvos(9.0)) = 0xf0000000,
1214
+ 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
532
1215
  };
533
1216
  typedef NS_OPTIONS(NSUInteger, NSDataSearchOptions) {
534
1217
  NSDataSearchBackwards = 1UL << 0,
535
1218
  NSDataSearchAnchored = 1UL << 1
536
- };
1219
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
537
1220
  typedef NS_OPTIONS(NSUInteger, NSDataBase64EncodingOptions) {
538
1221
  NSDataBase64Encoding64CharacterLineLength = 1UL << 0,
539
1222
  NSDataBase64Encoding76CharacterLineLength = 1UL << 1,
540
1223
  NSDataBase64EncodingEndLineWithCarriageReturn = 1UL << 4,
541
1224
  NSDataBase64EncodingEndLineWithLineFeed = 1UL << 5,
542
- } __attribute__((availability(ios,introduced=7.0)));
1225
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
543
1226
  typedef NS_OPTIONS(NSUInteger, NSDataBase64DecodingOptions) {
544
1227
  NSDataBase64DecodingIgnoreUnknownCharacters = 1UL << 0
545
- } __attribute__((availability(macos,introduced=10.9), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1228
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
546
1229
  __attribute__((swift_bridge("Data")))
547
1230
  @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
1231
+ @property (readonly) NSUInteger length;
1232
+ @property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
1233
+ @end
1234
+ @interface NSData (NSExtendedData)
1235
+ @property (readonly, copy) NSString *description;
548
1236
  - (void)getBytes:(void *)buffer length:(NSUInteger)length;
1237
+ - (void)getBytes:(void *)buffer range:(NSRange)range;
549
1238
  - (BOOL)isEqualToData:(NSData *)other;
550
- - (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)));
551
- - (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)));
1239
+ - (NSData *)subdataWithRange:(NSRange)range;
1240
+ - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
1241
+ - (BOOL)writeToURL:(NSURL *)url atomically:(BOOL)atomically;
1242
+ - (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
552
1243
  - (BOOL)writeToURL:(NSURL *)url options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
553
- + (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
554
- + (nullable instancetype)dataWithContentsOfFile:(NSString *)path;
1244
+ - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1245
+ - (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));
1246
+ @end
1247
+ @interface NSData (NSDataCreation)
555
1248
  + (instancetype)data;
556
- @property (readonly) NSUInteger length;
557
- @property (readonly) const void *bytes NS_RETURNS_INNER_POINTER;
558
1249
  + (instancetype)dataWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
1250
+ + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
559
1251
  + (instancetype)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
560
- - (NSData *)subdataWithRange:(NSRange)range;
561
- - (BOOL)writeToFile:(NSString *)path options:(NSDataWritingOptions)writeOptionsMask error:(NSError **)errorPtr;
562
- - (NSRange)rangeOfData:(NSData *)dataToFind options:(NSDataSearchOptions)mask range:(NSRange)searchRange;
1252
+ + (nullable instancetype)dataWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1253
+ + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1254
+ + (nullable instancetype)dataWithContentsOfFile:(NSString *)path;
1255
+ + (nullable instancetype)dataWithContentsOfURL:(NSURL *)url;
1256
+ - (instancetype)initWithBytes:(nullable const void *)bytes length:(NSUInteger)length;
1257
+ - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
1258
+ - (instancetype)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
1259
+ - (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));
1260
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1261
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url options:(NSDataReadingOptions)readOptionsMask error:(NSError **)errorPtr;
1262
+ - (nullable instancetype)initWithContentsOfFile:(NSString *)path;
1263
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url;
1264
+ - (instancetype)initWithData:(NSData *)data;
1265
+ + (instancetype)dataWithData:(NSData *)data;
563
1266
  @end
564
- @interface NSData (NSExtendedData)
565
- - (BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
1267
+ @interface NSData (NSDataBase64Encoding)
1268
+ - (nullable instancetype)initWithBase64EncodedString:(NSString *)base64String options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1269
+ - (NSString *)base64EncodedStringWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1270
+ - (nullable instancetype)initWithBase64EncodedData:(NSData *)base64Data options:(NSDataBase64DecodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1271
+ - (NSData *)base64EncodedDataWithOptions:(NSDataBase64EncodingOptions)options API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
566
1272
  @end
567
1273
  @interface NSData (NSDeprecated)
568
1274
  - (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")));
569
1275
  @end
570
- @interface NSData (NSDataBase64Encoding)
571
- - (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)));
572
- @end
573
1276
  @interface NSMutableData : NSData
574
- - (nullable instancetype)initWithCapacity:(NSUInteger)capacity;
575
- - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
576
1277
  @property (readonly) void *mutableBytes NS_RETURNS_INNER_POINTER;
577
1278
  @property NSUInteger length;
578
- + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
579
- + (nullable instancetype)dataWithLength:(NSUInteger)length;
580
1279
  @end
581
1280
  @interface NSMutableData (NSExtendedMutableData)
1281
+ - (void)appendBytes:(const void *)bytes length:(NSUInteger)length;
582
1282
  - (void)appendData:(NSData *)other;
1283
+ - (void)increaseLengthBy:(NSUInteger)extraLength;
1284
+ - (void)replaceBytesInRange:(NSRange)range withBytes:(const void *)bytes;
1285
+ - (void)resetBytesInRange:(NSRange)range;
1286
+ - (void)setData:(NSData *)data;
1287
+ - (void)replaceBytesInRange:(NSRange)range withBytes:(nullable const void *)replacementBytes length:(NSUInteger)replacementLength;
583
1288
  @end
1289
+ @interface NSMutableData (NSMutableDataCreation)
1290
+ + (nullable instancetype)dataWithCapacity:(NSUInteger)aNumItems;
1291
+ + (nullable instancetype)dataWithLength:(NSUInteger)length;
1292
+ - (nullable instancetype)initWithCapacity:(NSUInteger)capacity;
1293
+ - (nullable instancetype)initWithLength:(NSUInteger)length;
1294
+ @end
1295
+ NS_SWIFT_SENDABLE
584
1296
  __attribute__((swift_bridge("Date")))
585
1297
  @interface NSDate : NSObject <NSCopying, NSSecureCoding>
1298
+ @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate;
1299
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1300
+ - (instancetype)initWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti NS_DESIGNATED_INITIALIZER;
1301
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1302
+ @end
1303
+ @interface NSDate (NSExtendedDate)
1304
+ - (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate;
1305
+ @property (readonly) NSTimeInterval timeIntervalSinceNow;
1306
+ @property (readonly) NSTimeInterval timeIntervalSince1970;
1307
+ - (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));
1308
+ - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti API_AVAILABLE(macos(10.6), ios(2.0), watchos(2.0), tvos(9.0));
1309
+ - (NSDate *)earlierDate:(NSDate *)anotherDate;
586
1310
  - (NSDate *)laterDate:(NSDate *)anotherDate;
587
- + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs;
588
- + (instancetype)date;
589
1311
  - (NSComparisonResult)compare:(NSDate *)other;
590
- - (instancetype)dateByAddingTimeInterval:(NSTimeInterval)ti __attribute__((availability(ios,introduced=2.0)));
591
- @property (readonly) NSTimeInterval timeIntervalSinceNow;
592
1312
  - (BOOL)isEqualToDate:(NSDate *)otherDate;
593
- @property (readonly) NSTimeInterval timeIntervalSinceReferenceDate;
594
- @property (readonly) NSTimeInterval timeIntervalSince1970;
1313
+ @property (readonly, copy) NSString *description;
1314
+ - (NSString *)descriptionWithLocale:(nullable id)locale;
595
1315
  @property (class, readonly) NSTimeInterval timeIntervalSinceReferenceDate;
596
- + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs;
1316
+ @end
1317
+ @interface NSDate (NSDateCreation)
1318
+ + (instancetype)date;
1319
+ + (instancetype)dateWithTimeIntervalSinceNow:(NSTimeInterval)secs;
597
1320
  + (instancetype)dateWithTimeIntervalSinceReferenceDate:(NSTimeInterval)ti;
1321
+ + (instancetype)dateWithTimeIntervalSince1970:(NSTimeInterval)secs;
1322
+ + (instancetype)dateWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date;
1323
+ @property (class, readonly, copy) NSDate *distantFuture;
1324
+ @property (class, readonly, copy) NSDate *distantPast;
1325
+ @property (class, readonly, copy) NSDate *now API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1326
+ - (instancetype)initWithTimeIntervalSinceNow:(NSTimeInterval)secs;
1327
+ - (instancetype)initWithTimeIntervalSince1970:(NSTimeInterval)secs;
1328
+ - (instancetype)initWithTimeInterval:(NSTimeInterval)secsToBeAdded sinceDate:(NSDate *)date;
598
1329
  @end
599
1330
  __attribute__((swift_bridge("DateComponents")))
600
1331
  @interface NSDateComponents : NSObject <NSCopying, NSSecureCoding>
1332
+ @property NSInteger year;
1333
+ @property NSInteger month;
1334
+ @property NSInteger day;
1335
+ @property NSInteger hour;
1336
+ @property NSInteger minute;
1337
+ @property NSInteger second;
601
1338
  @end
602
1339
  __attribute__((swift_bridge("DateInterval")))
603
1340
  @interface NSDateInterval : NSObject <NSCopying, NSSecureCoding>
604
1341
  @end
605
- typedef NSString * NSURLResourceKey NS_TYPED_EXTENSIBLE_ENUM;
606
- __attribute__((swift_bridge("URL")))
607
- @interface NSURL : NSObject <NSCopying, NSSecureCoding>
608
- - (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)));
609
- @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)));
610
- - (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)));
611
- + (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)));
612
- @property (readonly, getter=isFileURL) BOOL fileURL;
613
- - (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)));
614
- @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)));
615
- @property (nullable, readonly, copy) NSString *path;
616
- @property (nullable, readonly, copy) NSString *scheme;
617
- @property (nullable, readonly, copy) NSString *host;
618
- + (nullable instancetype)URLWithString:(NSString * _Nonnull)URLString;
619
- + (NSURL *)fileURLWithPath:(NSString *)path;
620
- - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent __attribute__((availability(ios,introduced=4.0)));
621
- @property (nullable, readonly, copy) NSString *absoluteString;
1342
+ typedef NSString * NSURLResourceKey NS_TYPED_EXTENSIBLE_ENUM;
1343
+ __attribute__((swift_bridge("URL")))
1344
+ NS_SWIFT_SENDABLE
1345
+ @interface NSURL: NSObject <NSSecureCoding, NSCopying>
1346
+ - (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;
1347
+ - (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;
1348
+ - (instancetype)initFileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
1349
+ - (instancetype)initFileURLWithPath:(NSString *)path NS_DESIGNATED_INITIALIZER;
1350
+ + (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));
1351
+ + (NSURL *)fileURLWithPath:(NSString *)path relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1352
+ + (NSURL *)fileURLWithPath:(NSString *)path isDirectory:(BOOL)isDir API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1353
+ + (NSURL *)fileURLWithPath:(NSString *)path;
1354
+ - (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;
1355
+ + (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));
1356
+ - (nullable instancetype)initWithString:(NSString *)URLString;
1357
+ - (nullable instancetype)initWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL NS_DESIGNATED_INITIALIZER;
1358
+ + (nullable instancetype)URLWithString:(NSString *)URLString;
1359
+ + (nullable instancetype)URLWithString:(NSString *)URLString relativeToURL:(nullable NSURL *)baseURL;
1360
+ - (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;
1361
+ + (NSURL *)URLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1362
+ - (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;
1363
+ + (NSURL *)absoluteURLWithDataRepresentation:(NSData *)data relativeToURL:(nullable NSURL *)baseURL API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1364
+ @property (readonly, copy) NSData *dataRepresentation API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1365
+ @property (nullable, readonly, copy) NSString *absoluteString;
1366
+ @property (readonly, copy) NSString *relativeString;
1367
+ @property (nullable, readonly, copy) NSURL *baseURL;
1368
+ @property (nullable, readonly, copy) NSURL *absoluteURL;
1369
+ @property (nullable, readonly, copy) NSString *scheme;
1370
+ @property (nullable, readonly, copy) NSString *resourceSpecifier;
1371
+ @property (nullable, readonly, copy) NSString *host;
1372
+ @property (nullable, readonly, copy) NSNumber *port;
1373
+ @property (nullable, readonly, copy) NSString *user;
1374
+ @property (nullable, readonly, copy) NSString *password;
1375
+ @property (nullable, readonly, copy) NSString *path;
1376
+ @property (nullable, readonly, copy) NSString *fragment;
1377
+ @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));
1378
+ @property (nullable, readonly, copy) NSString *query;
1379
+ @property (nullable, readonly, copy) NSString *relativePath;
1380
+ @property (readonly) BOOL hasDirectoryPath API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1381
+ - (BOOL)getFileSystemRepresentation:(char *)buffer maxLength:(NSUInteger)maxBufferLength API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1382
+ @property (readonly) const char *fileSystemRepresentation NS_RETURNS_INNER_POINTER API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1383
+ @property (readonly, getter=isFileURL) BOOL fileURL;
1384
+
1385
+ @property (nullable, readonly, copy) NSURL *standardizedURL;
1386
+ @property (nullable, readonly, copy) NSURL *filePathURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1387
+ - (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));
1388
+ - (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));
1389
+ - (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));
1390
+ - (BOOL)setResourceValues:(NSDictionary<NSURLResourceKey, id> *)keyedValues error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1391
+
1392
+ - (void)removeCachedResourceValueForKey:(NSURLResourceKey)key API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1393
+ - (void)removeAllCachedResourceValues API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1394
+ - (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));
1395
+ - (BOOL)startAccessingSecurityScopedResource API_AVAILABLE(macos(10.7), ios(8.0), watchos(2.0), tvos(9.0));
1396
+ - (void)stopAccessingSecurityScopedResource API_AVAILABLE(macos(10.7), ios(8.0), watchos(2.0), tvos(9.0));
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
+
1520
+
1521
+
1522
+
1523
+
1524
+
1525
+
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1544
+
1545
+
1546
+
1547
+
1548
+
1549
+
1550
+
1551
+ @end
1552
+ NS_SWIFT_SENDABLE
1553
+ API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0))
1554
+ @interface NSURL (NSURLPathUtilities)
1555
+ + (nullable NSURL *)fileURLWithPathComponents:(NSArray<NSString *> *)components API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1556
+ @property (nullable, readonly, copy) NSArray<NSString *> *pathComponents API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1557
+ @property (nullable, readonly, copy) NSString *lastPathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1558
+ @property (nullable, readonly, copy) NSString *pathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1559
+ - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1560
+ - (nullable NSURL *)URLByAppendingPathComponent:(NSString *)pathComponent isDirectory:(BOOL)isDirectory API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
1561
+ @property (nullable, readonly, copy) NSURL *URLByDeletingLastPathComponent API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1562
+ - (nullable NSURL *)URLByAppendingPathExtension:(NSString *)pathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1563
+ @property (nullable, readonly, copy) NSURL *URLByDeletingPathExtension API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1564
+ - (BOOL)checkResourceIsReachableAndReturnError:(NSError **)error NS_SWIFT_NOTHROW API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1565
+ @property (nullable, readonly, copy) NSURL *URLByStandardizingPath API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1566
+ @property (nullable, readonly, copy) NSURL *URLByResolvingSymlinksInPath API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
622
1567
  @end
623
1568
  __attribute__((swift_bridge("URLComponents")))
624
1569
  @interface NSURLComponents : NSObject <NSCopying>
@@ -642,19 +1587,18 @@ typedef NS_ENUM(NSUInteger, NSURLRequestCachePolicy)
642
1587
 
643
1588
  NSURLRequestReloadRevalidatingCacheData = 5,
644
1589
  };
645
- typedef NS_ENUM(NSUInteger, NSURLCredentialPersistence) {
646
- NSURLCredentialPersistenceNone,
647
- NSURLCredentialPersistenceForSession,
648
- NSURLCredentialPersistencePermanent,
649
- NSURLCredentialPersistenceSynchronizable __attribute__((availability(macos,introduced=10.8), availability(ios,introduced=6.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
650
- };
651
1590
  __attribute__((swift_bridge("URLRequest")))
652
1591
  @interface NSURLRequest : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
1592
+ + (instancetype)requestWithURL:(NSURL *)URL;
1593
+ + (instancetype)requestWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval;
1594
+ - (instancetype)initWithURL:(NSURL *)URL;
653
1595
  - (instancetype)initWithURL:(NSURL *)URL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval)timeoutInterval NS_DESIGNATED_INITIALIZER;
654
1596
  @property (nullable, readonly, copy) NSURL *URL;
655
- + (instancetype _Nonnull)requestWithURL:(NSURL * _Nonnull)URL;
1597
+ @property (readonly) NSURLRequestCachePolicy cachePolicy;
1598
+ @property (readonly) NSTimeInterval timeoutInterval;
656
1599
  @end
657
1600
  @interface NSMutableURLRequest : NSURLRequest
1601
+ @property NSURLRequestCachePolicy cachePolicy;
658
1602
  @property (nullable, copy) NSDictionary<NSString *, NSString *> *allHTTPHeaderFields;
659
1603
  @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")));
660
1604
  @property BOOL HTTPShouldHandleCookies;
@@ -667,16 +1611,97 @@ __attribute__((swift_bridge("URLRequest")))
667
1611
  @end
668
1612
  NS_SWIFT_NAME(URLResponse)
669
1613
  @interface NSURLResponse : NSObject <NSCopying, NSSecureCoding>
1614
+ - (instancetype)initWithURL:(NSURL *)URL MIMEType:(nullable NSString *)MIMEType expectedContentLength:(NSInteger)length textEncodingName:(nullable NSString *)name;
1615
+ @property (nullable, readonly, copy) NSString *textEncodingName;
1616
+ @property (nullable, readonly, copy) NSString *suggestedFilename;
670
1617
  @property (readonly) long long expectedContentLength;
671
1618
  @property (nullable, readonly, copy) NSString *MIMEType;
672
1619
  @property (nullable, readonly, copy) NSURL *URL;
673
1620
  @end
674
1621
  NS_SWIFT_NAME(HTTPURLResponse)
675
1622
  @interface NSHTTPURLResponse : NSURLResponse
1623
+ + (NSString *)localizedStringForStatusCode:(NSInteger)statusCode;
1624
+ - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
676
1625
  - (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)));
677
1626
  @property (readonly, copy) NSDictionary *allHeaderFields;
678
1627
  @property (readonly) NSInteger statusCode;
679
1628
  @end
1629
+
1630
+ typedef NSString * NSHTTPCookiePropertyKey NS_TYPED_EXTENSIBLE_ENUM;
1631
+ typedef NSString * NSHTTPCookieStringPolicy NS_TYPED_ENUM;
1632
+ 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)));
1633
+ 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)));
1634
+ 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)));
1635
+ 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)));
1636
+ 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)));
1637
+ 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)));
1638
+ 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)));
1639
+ 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)));
1640
+ 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)));
1641
+ 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)));
1642
+ 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)));
1643
+ 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)));
1644
+ 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)));
1645
+ 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)));
1646
+ 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)));
1647
+ 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)));
1648
+ 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)));
1649
+ @class NSHTTPCookieInternal;
1650
+ NS_SWIFT_SENDABLE
1651
+ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
1652
+ @interface NSHTTPCookie : NSObject
1653
+ {
1654
+ @private
1655
+ NSHTTPCookieInternal * _cookiePrivate;
1656
+ }
1657
+ - (nullable instancetype)initWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties;
1658
+ + (nullable NSHTTPCookie *)cookieWithProperties:(NSDictionary<NSHTTPCookiePropertyKey, id> *)properties;
1659
+ + (NSDictionary<NSString *, NSString *> *)requestHeaderFieldsWithCookies:(NSArray<NSHTTPCookie *> *)cookies;
1660
+ + (NSArray<NSHTTPCookie *> *)cookiesWithResponseHeaderFields:(NSDictionary<NSString *, NSString *> *)headerFields forURL:(NSURL *)URL;
1661
+ @property (nullable, readonly, copy) NSDictionary<NSHTTPCookiePropertyKey, id> *properties;
1662
+ @property (readonly) NSUInteger version;
1663
+ @property (readonly, copy) NSString *name;
1664
+ @property (readonly, copy) NSString *value;
1665
+ @property (nullable, readonly, copy) NSDate *expiresDate;
1666
+ @property (readonly, getter=isSessionOnly) BOOL sessionOnly;
1667
+ @property (readonly, copy) NSString *domain;
1668
+ @property (readonly, copy) NSString *path;
1669
+ @property (readonly, getter=isSecure) BOOL secure;
1670
+ @property (readonly, getter=isHTTPOnly) BOOL HTTPOnly;
1671
+ @property (nullable, readonly, copy) NSString *comment;
1672
+ @property (nullable, readonly, copy) NSURL *commentURL;
1673
+ @property (nullable, readonly, copy) NSArray<NSNumber *> *portList;
1674
+ @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)));
1675
+ @end
1676
+
1677
+ typedef NS_ENUM(NSUInteger, NSHTTPCookieAcceptPolicy) {
1678
+ NSHTTPCookieAcceptPolicyAlways,
1679
+ NSHTTPCookieAcceptPolicyNever,
1680
+ NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain
1681
+ };
1682
+ @class NSHTTPCookieStorageInternal, NSURLSessionTask, NSSortDescriptor;
1683
+ NS_SWIFT_SENDABLE
1684
+ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))
1685
+ @interface NSHTTPCookieStorage : NSObject
1686
+ {
1687
+ @private
1688
+ NSHTTPCookieStorageInternal *_internal;
1689
+ }
1690
+ @property(class, readonly, strong) NSHTTPCookieStorage *sharedHTTPCookieStorage;
1691
+ + (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)));
1692
+ @property (nullable , readonly, copy) NSArray<NSHTTPCookie *> *cookies;
1693
+ - (void)setCookie:(NSHTTPCookie *)cookie;
1694
+ - (void)deleteCookie:(NSHTTPCookie *)cookie;
1695
+ - (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)));
1696
+ - (nullable NSArray<NSHTTPCookie *> *)cookiesForURL:(NSURL *)URL;
1697
+ - (void)setCookies:(NSArray<NSHTTPCookie *> *)cookies forURL:(nullable NSURL *)URL mainDocumentURL:(nullable NSURL *)mainDocumentURL;
1698
+ @property NSHTTPCookieAcceptPolicy cookieAcceptPolicy;
1699
+ - (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)));
1700
+ @end
1701
+ @interface NSHTTPCookieStorage (NSURLSessionTaskAdditions)
1702
+ - (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)));
1703
+ - (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)));
1704
+ @end
680
1705
  NS_SWIFT_NAME(URLSessionDelegate)
681
1706
  @protocol NSURLSessionDelegate <NSObject>
682
1707
  @end
@@ -784,17 +1809,18 @@ NS_SWIFT_NAME(URLSessionConfiguration)
784
1809
  @property NSTimeInterval timeoutIntervalForRequest;
785
1810
  @property (class, readonly, strong) NSURLSessionConfiguration *defaultSessionConfiguration;
786
1811
  @end
787
- NS_SWIFT_NAME(URLCredential)
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
1812
  __attribute__((swift_bridge("UUID")))
793
1813
  @interface NSUUID : NSObject <NSCopying, NSSecureCoding>
794
- + (instancetype)UUID;
1814
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
1815
+ - (nullable instancetype)initWithUUIDString:(NSString *)string;
1816
+ - (instancetype)initWithUUIDBytes:(const uuid_t _Nullable)bytes;
795
1817
  - (void)getUUIDBytes:(uuid_t _Nonnull)uuid;
1818
+ - (NSComparisonResult)compare:(NSUUID *)otherUUID API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
796
1819
  @property (readonly, copy) NSString *UUIDString;
797
1820
  @end
1821
+ @interface NSUUID (NSUUIDCreation)
1822
+ + (instancetype)UUID NS_SWIFT_UNAVAILABLE("Use init() instead");
1823
+ @end
798
1824
  __attribute__((swift_bridge("IndexPath")))
799
1825
  @interface NSIndexPath : NSObject <NSCopying, NSSecureCoding>
800
1826
  @end
@@ -812,29 +1838,212 @@ __attribute__((swift_bridge("CharacterSet")))
812
1838
  @property (readonly, copy) NSCharacterSet *invertedSet;
813
1839
  @end
814
1840
  FOUNDATION_EXPORT NSString * const NSUserActivityTypeBrowsingWeb;
815
- typedef NSString * NSLocaleKey NS_TYPED_EXTENSIBLE_ENUM;
1841
+ typedef NSString * NSLocaleKey NS_TYPED_ENUM;
816
1842
  __attribute__((swift_bridge("Locale")))
1843
+ NS_SWIFT_SENDABLE
817
1844
  @interface NSLocale : NSObject <NSCopying, NSSecureCoding>
818
1845
  - (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
1846
  - (nullable NSString *)displayNameForKey:(NSLocaleKey)key value:(id)value;
1847
+ - (instancetype)initWithLocaleIdentifier:(NSString *)string NS_DESIGNATED_INITIALIZER;
1848
+ - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
1849
+ @end
1850
+ @interface NSLocale (NSExtendedLocale)
1851
+ @property (readonly, copy) NSString *localeIdentifier;
1852
+ - (NSString *)localizedStringForLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1853
+ @property (readonly, copy) NSString *languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1854
+ - (nullable NSString *)localizedStringForLanguageCode:(NSString *)languageCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1855
+ @property (readonly, copy) NSString *languageIdentifier API_AVAILABLE(macosx(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1856
+ @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));
1857
+ - (nullable NSString *)localizedStringForCountryCode:(NSString *)countryCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1858
+ @property (nullable, readonly, copy) NSString *regionCode API_AVAILABLE(macosx(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1859
+ @property (nullable, readonly, copy) NSString *scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1860
+ - (nullable NSString *)localizedStringForScriptCode:(NSString *)scriptCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1861
+ @property (nullable, readonly, copy) NSString *variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1862
+ - (nullable NSString *)localizedStringForVariantCode:(NSString *)variantCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1863
+ @property (readonly, copy) NSCharacterSet *exemplarCharacterSet API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1864
+ @property (readonly, copy) NSString *calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1865
+ - (nullable NSString *)localizedStringForCalendarIdentifier:(NSString *)calendarIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1866
+ @property (nullable, readonly, copy) NSString *collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1867
+ - (nullable NSString *)localizedStringForCollationIdentifier:(NSString *)collationIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1868
+ @property (readonly) BOOL usesMetricSystem API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1869
+ @property (readonly, copy) NSString *decimalSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1870
+ @property (readonly, copy) NSString *groupingSeparator API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1871
+ @property (readonly, copy) NSString *currencySymbol API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1872
+ @property (nullable, readonly, copy) NSString *currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1873
+ - (nullable NSString *)localizedStringForCurrencyCode:(NSString *)currencyCode API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1874
+ @property (readonly, copy) NSString *collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1875
+ - (nullable NSString *)localizedStringForCollatorIdentifier:(NSString *)collatorIdentifier API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1876
+ @property (readonly, copy) NSString *quotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1877
+ @property (readonly, copy) NSString *quotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1878
+ @property (readonly, copy) NSString *alternateQuotationBeginDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
1879
+ @property (readonly, copy) NSString *alternateQuotationEndDelimiter API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
824
1880
  @end
825
1881
  @interface NSLocale (NSLocaleCreation)
826
- @property (class, readonly, copy) NSLocale *currentLocale;
1882
+ @property (class, readonly, strong) NSLocale *autoupdatingCurrentLocale API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1883
+ @property (class, readonly, copy) NSLocale *currentLocale;
1884
+ @property (class, readonly, copy) NSLocale *systemLocale;
1885
+ + (instancetype)localeWithLocaleIdentifier:(NSString *)ident API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1886
+ - (instancetype)init NS_UNAVAILABLE;
1887
+ @end
1888
+ @interface NSLocale (NSLocaleGeneralInfo)
1889
+ @property (class, readonly, copy) NSArray<NSString *> *availableLocaleIdentifiers;
1890
+ @property (class, readonly, copy) NSArray<NSString *> *ISOLanguageCodes;
1891
+ @property (class, readonly, copy) NSArray<NSString *> *ISOCountryCodes;
1892
+ @property (class, readonly, copy) NSArray<NSString *> *ISOCurrencyCodes;
1893
+ @property (class, readonly, copy) NSArray<NSString *> *commonISOCurrencyCodes API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1894
+ @property (class, readonly, copy) NSArray<NSString *> *preferredLanguages API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
1895
+ + (NSDictionary<NSString *, NSString *> *)componentsFromLocaleIdentifier:(NSString *)string;
1896
+ + (NSString *)localeIdentifierFromComponents:(NSDictionary<NSString *, NSString *> *)dict;
1897
+ + (NSString *)canonicalLocaleIdentifierFromString:(NSString *)string;
1898
+ + (NSString *)canonicalLanguageIdentifierFromString:(NSString *)string;
1899
+ + (nullable NSString *)localeIdentifierFromWindowsLocaleCode:(uint32_t)lcid API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1900
+ + (uint32_t)windowsLocaleCodeFromLocaleIdentifier:(NSString *)localeIdentifier API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1901
+ typedef NS_ENUM(NSUInteger, NSLocaleLanguageDirection) {
1902
+ NSLocaleLanguageDirectionUnknown = kCFLocaleLanguageDirectionUnknown,
1903
+ NSLocaleLanguageDirectionLeftToRight = kCFLocaleLanguageDirectionLeftToRight,
1904
+ NSLocaleLanguageDirectionRightToLeft = kCFLocaleLanguageDirectionRightToLeft,
1905
+ NSLocaleLanguageDirectionTopToBottom = kCFLocaleLanguageDirectionTopToBottom,
1906
+ NSLocaleLanguageDirectionBottomToTop = kCFLocaleLanguageDirectionBottomToTop
1907
+ };
1908
+ + (NSLocaleLanguageDirection)characterDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
1909
+ + (NSLocaleLanguageDirection)lineDirectionForLanguage:(NSString *)isoLangCode API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
827
1910
  @end
828
1911
  __attribute__((swift_bridge("TimeZone")))
829
1912
  @interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
1913
+ + (nullable instancetype)timeZoneWithName:(NSString *)tzName;
830
1914
  @property (class, readonly, copy) NSTimeZone *localTimeZone;
831
1915
  @property (nullable, readonly, copy) NSString *abbreviation;
832
1916
  + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
833
1917
  @end
1918
+ typedef NS_OPTIONS(NSUInteger, NSCalendarUnit) {
1919
+ /// Identifier for the era unit.
1920
+ ///
1921
+ /// The corresponding value is an `NSInteger`.
1922
+ NSCalendarUnitEra = kCFCalendarUnitEra,
1923
+ /// Identifier for the year unit.
1924
+ ///
1925
+ /// The corresponding value is an `NSInteger`.
1926
+ NSCalendarUnitYear = kCFCalendarUnitYear,
1927
+ /// Identifier for the month unit.
1928
+ ///
1929
+ /// The corresponding value is an `NSInteger`.
1930
+ NSCalendarUnitMonth = kCFCalendarUnitMonth,
1931
+ /// Identifier for the day unit.
1932
+ ///
1933
+ /// The corresponding value is an `NSInteger`.
1934
+ NSCalendarUnitDay = kCFCalendarUnitDay,
1935
+ /// Identifier for the hour unit.
1936
+ ///
1937
+ /// The corresponding value is an `NSInteger`.
1938
+ NSCalendarUnitHour = kCFCalendarUnitHour,
1939
+ /// Identifier for the minute unit.
1940
+ ///
1941
+ /// The corresponding value is an `NSInteger`.
1942
+ NSCalendarUnitMinute = kCFCalendarUnitMinute,
1943
+ /// Identifier for the second unit.
1944
+ ///
1945
+ /// The corresponding value is a `double`.
1946
+ NSCalendarUnitSecond = kCFCalendarUnitSecond,
1947
+ /// Identifier for the weekday unit.
1948
+ ///
1949
+ /// 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).
1950
+ NSCalendarUnitWeekday = kCFCalendarUnitWeekday,
1951
+ /// Identifier for the ordinal weekday unit.
1952
+ ///
1953
+ /// 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".
1954
+ NSCalendarUnitWeekdayOrdinal = kCFCalendarUnitWeekdayOrdinal,
1955
+ /// Identifier for the quarter of the calendar.
1956
+ ///
1957
+ /// The corresponding value is an `NSInteger`.
1958
+ ///
1959
+ /// > Important: The `NSCalendarUnitQuarter` unit is largely unimplemented, and is not recommended for use.
1960
+ NSCalendarUnitQuarter API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitQuarter,
1961
+ /// Identifier for the week of the month calendar unit.
1962
+ NSCalendarUnitWeekOfMonth API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitWeekOfMonth,
1963
+ /// Identifier for the week of the year calendar unit.
1964
+ NSCalendarUnitWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitWeekOfYear,
1965
+ /// Identifier for the week-counting year unit.
1966
+ NSCalendarUnitYearForWeekOfYear API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = kCFCalendarUnitYearForWeekOfYear,
1967
+ /// Identifier for the nanosecond unit.
1968
+ NSCalendarUnitNanosecond API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0)) = (1 << 15),
1969
+ NSCalendarUnitDayOfYear API_AVAILABLE(macos(15.0), ios(18.0), watchos(11.0), tvos(18.0)) = kCFCalendarUnitDayOfYear,
1970
+ /// Identifier for the calendar of a date components object.
1971
+ ///
1972
+ /// The corresponding value is an `NSCalendar`.
1973
+ NSCalendarUnitCalendar API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0)) = (1 << 20),
1974
+ /// Identifier for the time zone of a date components object.
1975
+ ///
1976
+ /// The corresponding value is an `NSTimeZone`.
1977
+ NSCalendarUnitTimeZone API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0)) = (1 << 21),
1978
+ NSCalendarUnitIsLeapMonth API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0)) = (1 << 30),
1979
+ NSCalendarUnitIsRepeatedDay API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0)) = (1UL << 31),
1980
+ #if !0
1981
+ /// Specifies the era unit.
1982
+ /// @deprecated Use `NSCalendarUnitEra` instead.
1983
+ 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,
1984
+ /// Specifies the year unit.
1985
+ /// @deprecated Use `NSCalendarUnitYear` instead.
1986
+ 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,
1987
+ /// Specifies the month unit.
1988
+ /// @deprecated Use `NSCalendarUnitMonth` instead.
1989
+ 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,
1990
+ /// Specifies the day unit.
1991
+ /// @deprecated Use `NSCalendarUnitDay` instead.
1992
+ 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,
1993
+ /// Specifies the hour unit.
1994
+ /// @deprecated Use `NSCalendarUnitHour` instead.
1995
+ 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,
1996
+ /// Specifies the minute unit.
1997
+ /// @deprecated Use `NSCalendarUnitMinute` instead.
1998
+ 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,
1999
+ /// Specifies the second unit.
2000
+ /// @deprecated Use `NSCalendarUnitSecond` instead.
2001
+ 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,
2002
+ /// Specifies the week unit.
2003
+ ///
2004
+ /// Equal to `kCFCalendarUnitWeek`.
2005
+ /// @deprecated Use `NSCalendarUnitWeekOfMonth` or `NSCalendarUnitWeekOfYear` instead.
2006
+ 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,
2007
+ /// Specifies the weekday unit.
2008
+ /// @deprecated Use `NSCalendarUnitWeekday` instead.
2009
+ 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,
2010
+ /// Specifies the ordinal weekday unit.
2011
+ ///
2012
+ /// 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`.
2013
+ /// @deprecated Use `NSCalendarUnitWeekdayOrdinal` instead.
2014
+ 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,
2015
+ /// Specifies the quarter unit.
2016
+ /// @deprecated Use `NSCalendarUnitQuarter` instead.
2017
+ 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,
2018
+ /// Specifies the week of the month calendar unit.
2019
+ /// @deprecated Use `NSCalendarUnitWeekOfMonth` instead.
2020
+ 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,
2021
+ /// Specifies the week of the year calendar unit.
2022
+ /// @deprecated Use `NSCalendarUnitWeekOfYear` instead.
2023
+ 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,
2024
+ /// Specifies the year when the calendar is being interpreted as a week-based calendar.
2025
+ /// @deprecated Use `NSCalendarUnitYearForWeekOfYear` instead.
2026
+ 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,
2027
+ /// Specifies the calendar of the calendar.
2028
+ /// @deprecated Use `NSCalendarUnitCalendar` instead.
2029
+ 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,
2030
+ /// Specifies the time zone of the calendar as an `NSTimeZone`.
2031
+ /// @deprecated Use `NSCalendarUnitTimeZone` instead.
2032
+ 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,
2033
+ #endif
2034
+ };
2035
+
2036
+ typedef NSString * NSCalendarIdentifier NS_TYPED_EXTENSIBLE_ENUM;
2037
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGregorian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
834
2038
  __attribute__((swift_bridge("Calendar")))
835
2039
  @interface NSCalendar : NSObject <NSCopying, NSSecureCoding>
2040
+ - (nullable id)initWithCalendarIdentifier:(NSCalendarIdentifier)ident NS_DESIGNATED_INITIALIZER;
2041
+ @property (copy) NSTimeZone *timeZone;
2042
+ - (NSDateComponents *)components:(NSCalendarUnit)unitFlags fromDate:(NSDate *)date;
836
2043
  @end
837
2044
  typedef NSString *NSNotificationName NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(NSNotification.Name);
2045
+ 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")));
2046
+ 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
2047
  __attribute__((swift_bridge("Notification")))
839
2048
  @interface NSNotification : NSObject <NSCopying, NSCoding>
840
2049
  @property (nullable, readonly, retain) id object;
@@ -851,21 +2060,6 @@ NS_SWIFT_NAME(NotificationCenter)
851
2060
  - (void)removeObserver:(id)observer;
852
2061
  @end
853
2062
  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
2063
  typedef NSString *NSErrorUserInfoKey;
870
2064
  FOUNDATION_EXPORT NSErrorDomain const NSCocoaErrorDomain;
871
2065
  NS_ERROR_ENUM(NSCocoaErrorDomain) {
@@ -888,17 +2082,54 @@ __attribute__((swift_bridge("Swift.Error")))
888
2082
  @property (readonly) NSInteger code;
889
2083
  @property (readonly, copy) NSDictionary<NSErrorUserInfoKey, id> *userInfo;
890
2084
  @property (readonly, copy) NSString *localizedDescription;
2085
+ @property (nullable, readonly, copy) NSString *localizedFailureReason;
2086
+ @property (nullable, readonly, copy) NSString *localizedRecoverySuggestion;
2087
+ @property (nullable, readonly, copy) NSArray<NSString *> *localizedRecoveryOptions;
2088
+ @property (nullable, readonly, strong) id recoveryAttempter;
2089
+ @property (nullable, readonly, copy) NSString *helpAnchor;
2090
+ + (void)setUserInfoValueProviderForDomain:(NSErrorDomain)errorDomain provider:(id _Nullable (NS_SWIFT_SENDABLE ^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))provider NS_SWIFT_NAME(NSError.setUserInfoValueProvider(forDomain:provider:));
2091
+ + (id _Nullable (NS_SWIFT_SENDABLE ^ _Nullable)(NSError *err, NSErrorUserInfoKey userInfoKey))userInfoValueProviderForDomain:(NSErrorDomain)errorDomain;
891
2092
  @end
892
2093
  typedef NSString *NSExceptionName NS_TYPED_EXTENSIBLE_ENUM;
2094
+ FOUNDATION_EXPORT NSExceptionName const NSGenericException;
2095
+ FOUNDATION_EXPORT NSExceptionName const NSRangeException;
893
2096
  FOUNDATION_EXPORT NSExceptionName const NSInvalidArgumentException;
894
- @interface NSException : NSObject <NSCopying, NSSecureCoding>
2097
+ FOUNDATION_EXPORT NSExceptionName const NSInternalInconsistencyException;
2098
+ FOUNDATION_EXPORT NSExceptionName const NSMallocException;
2099
+ FOUNDATION_EXPORT NSExceptionName const NSObjectInaccessibleException;
2100
+ FOUNDATION_EXPORT NSExceptionName const NSObjectNotAvailableException;
2101
+ FOUNDATION_EXPORT NSExceptionName const NSDestinationInvalidException;
2102
+ FOUNDATION_EXPORT NSExceptionName const NSPortTimeoutException;
2103
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidSendPortException;
2104
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidReceivePortException;
2105
+ FOUNDATION_EXPORT NSExceptionName const NSPortSendException;
2106
+ FOUNDATION_EXPORT NSExceptionName const NSPortReceiveException;
2107
+ FOUNDATION_EXPORT NSExceptionName const NSOldStyleException;
2108
+ FOUNDATION_EXPORT NSExceptionName const NSInconsistentArchiveException;
2109
+ FOUNDATION_EXPORT NSExceptionName const NSCharacterConversionException;
2110
+ FOUNDATION_EXPORT NSExceptionName const NSParseErrorException; // raised by -propertyList
2111
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidArchiveOperationException;
2112
+ FOUNDATION_EXPORT NSExceptionName const NSInvalidUnarchiveOperationException;
2113
+ __attribute__((__objc_exception__))
2114
+ @interface NSException : NSObject <NSCopying, NSSecureCoding> {
2115
+ @private
2116
+ NSString *name;
2117
+ NSString *reason;
2118
+ NSDictionary *userInfo;
2119
+ id reserved;
2120
+ }
2121
+ + (NSException *)exceptionWithName:(NSExceptionName)name reason:(nullable NSString *)reason userInfo:(nullable NSDictionary *)userInfo;
2122
+ - (instancetype)initWithName:(NSExceptionName)aName reason:(nullable NSString *)aReason userInfo:(nullable NSDictionary *)aUserInfo NS_DESIGNATED_INITIALIZER;
895
2123
  @property (readonly, copy) NSExceptionName name;
896
- @property (nullable, readonly, copy) NSDictionary *userInfo;
897
2124
  @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)));
2125
+ @property (nullable, readonly, copy) NSDictionary *userInfo;
900
2126
  @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;
2127
+ @property (readonly, copy) NSArray<NSString *> *callStackSymbols __attribute__((availability(ios,introduced=4.0)));
2128
+ - (void)raise;
2129
+ @end
2130
+ @interface NSException (NSExceptionRaisingConveniences)
2131
+ + (void)raise:(NSExceptionName)name format:(NSString *)format, ... NS_FORMAT_FUNCTION(2,3);
2132
+ + (void)raise:(NSExceptionName)name format:(NSString *)format arguments:(va_list)argList NS_FORMAT_FUNCTION(2,0);
902
2133
  @end
903
2134
  FOUNDATION_EXPORT NSUncaughtExceptionHandler * _Nullable NSGetUncaughtExceptionHandler(void);
904
2135
  FOUNDATION_EXPORT void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler * _Nullable);
@@ -921,7 +2152,21 @@ FOUNDATION_EXPORT void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler
921
2152
  #endif
922
2153
  #define NSCParameterAssert(condition) NSCAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)
923
2154
  #define NSParameterAssert(condition) NSAssert((condition), @"Invalid parameter not satisfying: %@", @#condition)
2155
+ @interface NSObject (_NSCFTypeID)
2156
+ @property (readonly) CFTypeID _cfTypeID;
2157
+ @end
2158
+ @interface NSObject (NSCoderMethods)
2159
+ @property (readonly) Class classForCoder;
2160
+ @end
2161
+ @interface NSObject (NSKeyedArchiverObjectSubstitution)
2162
+ @property (nullable, readonly) Class classForKeyedArchiver;
2163
+ + (NSArray<NSString *> *)classFallbacksForKeyedArchiver;
2164
+ @end
2165
+ @interface NSObject (NSKeyedUnarchiverObjectSubstitution)
2166
+ + (Class)classForKeyedUnarchiver;
2167
+ @end
924
2168
  @interface NSObject (NSKeyValueCoding)
2169
+ - (nullable id)valueForKey:(NSString *)key;
925
2170
  - (void)setValue:(nullable id)value forKey:(NSString *)key;
926
2171
  @end
927
2172
  NS_SWIFT_NAME(Bundle)
@@ -934,11 +2179,14 @@ NS_SWIFT_NAME(Bundle)
934
2179
  @property (nullable, readonly, copy) NSURL *appStoreReceiptURL __attribute__((availability(macos,introduced=10.7), availability(ios,introduced=7.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
935
2180
  #endif
936
2181
  @property (readonly, copy) NSString *bundlePath;
2182
+ @property (readonly, copy) NSURL *bundleURL __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2183
+ @property (nullable, readonly, copy) NSURL *resourceURL __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
937
2184
  @property (nullable, readonly, copy) NSString *executablePath;
938
2185
  @property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary;
939
2186
  @property (class, readonly, strong) NSBundle *mainBundle;
940
2187
  - (nullable NSURL *)URLForResource:(nullable NSString *)name withExtension:(nullable NSString *)ext __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
941
2188
  - (nullable instancetype)initWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2189
+ + (nullable instancetype)bundleWithURL:(NSURL *)url __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
942
2190
  + (NSBundle *)bundleForClass:(Class)aClass;
943
2191
  @property (nullable, readonly, copy) NSString *bundleIdentifier;
944
2192
  - (NSString *)localizedStringForKey:(NSString *)key value:(nullable NSString *)value table:(nullable NSString *)tableName NS_FORMAT_ARGUMENT(1);
@@ -947,7 +2195,6 @@ NS_SWIFT_NAME(UserDefaults)
947
2195
  @interface NSUserDefaults : NSObject
948
2196
  @property (class, readonly, strong) NSUserDefaults *standardUserDefaults;
949
2197
  @end
950
- NS_SWIFT_NAME(OperationQueue)
951
2198
  typedef NS_ENUM(NSInteger, NSOperationQueuePriority) {
952
2199
  NSOperationQueuePriorityVeryLow = -8L,
953
2200
  NSOperationQueuePriorityLow = -4L,
@@ -1049,22 +2296,6 @@ typedef NS_OPTIONS(NSUInteger, NSSearchPathDomainMask) {
1049
2296
  FOUNDATION_EXPORT NSString *NSHomeDirectory(void);
1050
2297
  FOUNDATION_EXPORT NSString *NSTemporaryDirectory(void);
1051
2298
  FOUNDATION_EXPORT NSArray<NSString *> *NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory directory, NSSearchPathDomainMask domainMask, BOOL expandTilde);
1052
- NS_SWIFT_NAME(FileManager)
1053
- typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
1054
- NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1UL << 0,
1055
-
1056
- NSDirectoryEnumerationSkipsPackageDescendants = 1UL << 1,
1057
-
1058
- NSDirectoryEnumerationSkipsHiddenFiles = 1UL << 2,
1059
-
1060
- /* 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.
1061
- */
1062
- NSDirectoryEnumerationIncludesDirectoriesPostOrder __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0))) = 1UL << 3,
1063
-
1064
- /* 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.
1065
- */
1066
- NSDirectoryEnumerationProducesRelativePathURLs __attribute__((availability(macos,introduced=10.15), availability(ios,introduced=13.0), availability(watchos,introduced=6.0), availability(tvos,introduced=13.0))) = 1UL << 4,
1067
- } __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1068
2299
  typedef NSString * NSKeyValueChangeKey NS_TYPED_ENUM;
1069
2300
  FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeKindKey;
1070
2301
  FOUNDATION_EXPORT NSKeyValueChangeKey const NSKeyValueChangeNewKey;
@@ -1089,65 +2320,702 @@ typedef NS_OPTIONS(NSUInteger, NSKeyValueObservingOptions) {
1089
2320
  */
1090
2321
  NSKeyValueObservingOptionPrior __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = 0x08
1091
2322
 
1092
- };
1093
- typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
1094
- NSKeyValueChangeSetting = 1,
1095
- NSKeyValueChangeInsertion = 2,
1096
- NSKeyValueChangeRemoval = 3,
1097
- NSKeyValueChangeReplacement = 4,
1098
- };
1099
- @interface NSDirectoryEnumerator<ObjectType> : NSEnumerator<ObjectType>
2323
+ };
2324
+ typedef NS_ENUM(NSUInteger, NSKeyValueChange) {
2325
+ NSKeyValueChangeSetting = 1,
2326
+ NSKeyValueChangeInsertion = 2,
2327
+ NSKeyValueChangeRemoval = 3,
2328
+ NSKeyValueChangeReplacement = 4,
2329
+ };
2330
+
2331
+ @class NSArray<ObjectType>, NSData, NSDate, NSDirectoryEnumerator<ObjectType>, NSError, NSNumber, NSFileProviderService, NSXPCConnection, NSLock, NSFileVersion;
2332
+ @protocol NSFileManagerDelegate;
2333
+ typedef NSString * NSFileAttributeKey NS_TYPED_EXTENSIBLE_ENUM;
2334
+ typedef NSString * NSFileAttributeType NS_TYPED_ENUM;
2335
+ typedef NSString * NSFileProtectionType NS_TYPED_ENUM;
2336
+ typedef NSString * NSFileProviderServiceName NS_TYPED_EXTENSIBLE_ENUM;
2337
+
2338
+
2339
+ typedef NS_OPTIONS(NSUInteger, NSVolumeEnumerationOptions) {
2340
+ NSVolumeEnumerationSkipHiddenVolumes = 1UL << 1,
2341
+ NSVolumeEnumerationProduceFileReferenceURLs = 1UL << 2
2342
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2343
+ typedef NS_OPTIONS(NSUInteger, NSDirectoryEnumerationOptions) {
2344
+ NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1UL << 0,
2345
+ NSDirectoryEnumerationSkipsPackageDescendants = 1UL << 1,
2346
+ NSDirectoryEnumerationSkipsHiddenFiles = 1UL << 2,
2347
+ NSDirectoryEnumerationIncludesDirectoriesPostOrder API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) = 1UL << 3,
2348
+ NSDirectoryEnumerationProducesRelativePathURLs API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0)) = 1UL << 4,
2349
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2350
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerItemReplacementOptions) {
2351
+ NSFileManagerItemReplacementUsingNewMetadataOnly = 1UL << 0,
2352
+ NSFileManagerItemReplacementWithoutDeletingBackupItem = 1UL << 1
2353
+ } API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2354
+ typedef NS_ENUM(NSInteger, NSURLRelationship) {
2355
+ NSURLRelationshipContains,
2356
+ NSURLRelationshipSame,
2357
+ NSURLRelationshipOther
2358
+ } API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2359
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerUnmountOptions) {
2360
+ NSFileManagerUnmountAllPartitionsAndEjectDisk = 1UL << 0,
2361
+ NSFileManagerUnmountWithoutUI = 1UL << 1,
2362
+ } API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios, watchos, tvos);
2363
+ FOUNDATION_EXPORT NSString *const NSFileManagerUnmountDissentingProcessIdentifierErrorKey API_AVAILABLE(macos(10.11)) API_UNAVAILABLE(ios, watchos, tvos);
2364
+ extern NSNotificationName const NSUbiquityIdentityDidChangeNotification API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2365
+ @interface NSFileManager : NSObject
2366
+ @property (class, readonly, strong) NSFileManager *defaultManager;
2367
+ - (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));
2368
+ - (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);
2369
+ - (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));
2370
+ - (NSArray<NSURL *> *)URLsForDirectory:(NSSearchPathDirectory)directory inDomains:(NSSearchPathDomainMask)domainMask API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2371
+ - (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));
2372
+ - (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));
2373
+ - (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));
2374
+ - (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));
2375
+ - (BOOL)createSymbolicLinkAtURL:(NSURL *)url withDestinationURL:(NSURL *)destURL error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2376
+ @property (nullable, assign) id <NSFileManagerDelegate> delegate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2377
+ - (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));
2378
+ - (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));
2379
+ - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2380
+ - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2381
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2382
+ - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfFileSystemForPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2383
+ - (BOOL)createSymbolicLinkAtPath:(NSString *)path withDestinationPath:(NSString *)destPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2384
+ - (nullable NSString *)destinationOfSymbolicLinkAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2385
+ - (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2386
+ - (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2387
+ - (BOOL)linkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2388
+ - (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2389
+ - (BOOL)copyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2390
+ - (BOOL)moveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2391
+ - (BOOL)linkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2392
+ - (BOOL)removeItemAtURL:(NSURL *)URL error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2393
+ - (BOOL)trashItemAtURL:(NSURL *)url resultingItemURL:(NSURL * _Nullable * _Nullable)outResultingURL error:(NSError **)error API_AVAILABLE(macos(10.8), ios(11.0)) API_UNAVAILABLE(watchos, tvos);
2394
+ - (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));
2395
+ - (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));
2396
+ - (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));
2397
+ - (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));
2398
+ - (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));
2399
+ - (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));
2400
+ - (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));
2401
+ #if TARGET_OS_OSX || TARGET_OS_MACCATALYST
2402
+ - (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));
2403
+ - (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));
2404
+ - (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));
2405
+ - (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));
2406
+ #endif
2407
+ @property (readonly, copy) NSString *currentDirectoryPath;
2408
+ - (BOOL)changeCurrentDirectoryPath:(NSString *)path;
2409
+ - (BOOL)fileExistsAtPath:(NSString *)path;
2410
+ - (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory;
2411
+ - (BOOL)isReadableFileAtPath:(NSString *)path;
2412
+ - (BOOL)isWritableFileAtPath:(NSString *)path;
2413
+ - (BOOL)isExecutableFileAtPath:(NSString *)path;
2414
+ - (BOOL)isDeletableFileAtPath:(NSString *)path;
2415
+ - (BOOL)contentsEqualAtPath:(NSString *)path1 andPath:(NSString *)path2;
2416
+ - (NSString *)displayNameAtPath:(NSString *)path;
2417
+ - (nullable NSArray<NSString *> *)componentsToDisplayForPath:(NSString *)path;
2418
+ - (nullable NSDirectoryEnumerator<NSString *> *)enumeratorAtPath:(NSString *)path;
2419
+ - (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));
2420
+ - (nullable NSArray<NSString *> *)subpathsAtPath:(NSString *)path;
2421
+ - (nullable NSData *)contentsAtPath:(NSString *)path;
2422
+ - (BOOL)createFileAtPath:(NSString *)path contents:(nullable NSData *)data attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attr;
2423
+ - (const char *)fileSystemRepresentationWithPath:(NSString *)path NS_RETURNS_INNER_POINTER;
2424
+ - (NSString *)stringWithFileSystemRepresentation:(const char *)str length:(NSUInteger)len;
2425
+ - (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));
2426
+ - (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));
2427
+ - (BOOL)isUbiquitousItemAtURL:(NSURL *)url API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2428
+ - (BOOL)startDownloadingUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2429
+ - (BOOL)evictUbiquitousItemAtURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2430
+ - (nullable NSURL *)URLForUbiquityContainerIdentifier:(nullable NSString *)containerIdentifier API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
2431
+ - (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));
2432
+ @property (nullable, readonly, copy) id<NSObject,NSCopying,NSCoding> ubiquityIdentityToken API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2433
+ typedef NS_OPTIONS(NSUInteger, NSFileManagerSupportedSyncControls) {
2434
+ NSFileManagerSupportedSyncControlsPauseSync = 1 << 0,
2435
+ NSFileManagerSupportedSyncControlsFailUploadOnConflict = 1 << 1,
2436
+ } API_AVAILABLE(ios(26.0), macos(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2437
+ - (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);
2438
+ typedef NS_ENUM(NSInteger, NSFileManagerResumeSyncBehavior) {
2439
+ NSFileManagerResumeSyncBehaviorPreserveLocalChanges = 0,
2440
+ NSFileManagerResumeSyncBehaviorAfterUploadWithFailOnConflict = 1,
2441
+ NSFileManagerResumeSyncBehaviorDropLocalChanges = 2,
2442
+ } API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2443
+ - (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);
2444
+ - (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);
2445
+ typedef NS_ENUM(NSInteger, NSFileManagerUploadLocalVersionConflictPolicy) {
2446
+ NSFileManagerUploadConflictPolicyDefault = 0,
2447
+ NSFileManagerUploadConflictPolicyFailOnConflict = 1,
2448
+ } API_AVAILABLE(ios(26.0), macos(26.0), visionos(26.0)) API_UNAVAILABLE(watchos, tvos);
2449
+ - (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);
2450
+ - (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);
2451
+ - (nullable NSURL *)containerURLForSecurityApplicationGroupIdentifier:(NSString *)groupIdentifier API_AVAILABLE(macos(10.8), ios(7.0), watchos(2.0), tvos(9.0));
2452
+ @end
2453
+ @interface NSFileManager (NSUserInformation)
2454
+ @property (readonly, copy) NSURL *homeDirectoryForCurrentUser API_AVAILABLE(macosx(10.12)) API_UNAVAILABLE(ios, watchos, tvos);
2455
+ @property (readonly, copy) NSURL *temporaryDirectory API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
2456
+ - (nullable NSURL *)homeDirectoryForUser:(NSString *)userName API_AVAILABLE(macosx(10.12)) API_UNAVAILABLE(ios, watchos, tvos);
2457
+ @end
2458
+ @interface NSObject (NSCopyLinkMoveHandler)
2459
+ - (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));
2460
+ - (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));
2461
+ @end
2462
+ @protocol NSFileManagerDelegate <NSObject>
2463
+ @optional
2464
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2465
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldCopyItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2466
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error copyingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2467
+ - (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));
2468
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2469
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldMoveItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2470
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error movingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2471
+ - (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));
2472
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2473
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldLinkItemAtURL:(NSURL *)srcURL toURL:(NSURL *)dstURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2474
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error linkingItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath;
2475
+ - (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));
2476
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtPath:(NSString *)path;
2477
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldRemoveItemAtURL:(NSURL *)URL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2478
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtPath:(NSString *)path;
2479
+ - (BOOL)fileManager:(NSFileManager *)fileManager shouldProceedAfterError:(NSError *)error removingItemAtURL:(NSURL *)URL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2480
+ @end
2481
+ @interface NSDirectoryEnumerator<ObjectType> : NSEnumerator<ObjectType>
2482
+ @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *fileAttributes;
2483
+ @property (nullable, readonly, copy) NSDictionary<NSFileAttributeKey, id> *directoryAttributes;
2484
+ @property (readonly) BOOL isEnumeratingDirectoryPostOrder API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2485
+ - (void)skipDescendents;
2486
+ @property (readonly) NSUInteger level API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2487
+ - (void)skipDescendants API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2488
+ @end
2489
+ API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(watchos, tvos)
2490
+ @interface NSFileProviderService : NSObject {
2491
+ @private
2492
+ NSFileProviderServiceName _name;
2493
+ id _endpointCreatingProxy;
2494
+ dispatch_group_t _requestFinishedGroup;
2495
+ }
2496
+ - (void)getFileProviderConnectionWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSXPCConnection * _Nullable connection, NSError * _Nullable error))completionHandler;
2497
+ @property (readonly, copy) NSFileProviderServiceName name;
2498
+ @end
2499
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileType;
2500
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeDirectory;
2501
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeRegular;
2502
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeSymbolicLink;
2503
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeSocket;
2504
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeCharacterSpecial;
2505
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeBlockSpecial;
2506
+ FOUNDATION_EXPORT NSFileAttributeType const NSFileTypeUnknown;
2507
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSize;
2508
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileModificationDate;
2509
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileReferenceCount;
2510
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileDeviceIdentifier;
2511
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileOwnerAccountName;
2512
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileGroupOwnerAccountName;
2513
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFilePosixPermissions;
2514
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemNumber;
2515
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFileNumber;
2516
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileExtensionHidden;
2517
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileHFSCreatorCode;
2518
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileHFSTypeCode;
2519
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileImmutable;
2520
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileAppendOnly;
2521
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileCreationDate;
2522
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileOwnerAccountID;
2523
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileGroupOwnerAccountID;
2524
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileBusy;
2525
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileProtectionKey API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2526
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionNone API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2527
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionComplete API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2528
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUnlessOpen API_AVAILABLE(macos(10.6), ios(5.0), watchos(2.0), tvos(9.0));
2529
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteUntilFirstUserAuthentication API_AVAILABLE(macos(10.6), ios(5.0), watchos(2.0), tvos(9.0));
2530
+ FOUNDATION_EXPORT NSFileProtectionType const NSFileProtectionCompleteWhenUserInactive API_AVAILABLE(ios(17.0), watchos(10.0), tvos(17.0)) API_UNAVAILABLE(macos);
2531
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemSize;
2532
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeSize;
2533
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemNodes;
2534
+ FOUNDATION_EXPORT NSFileAttributeKey const NSFileSystemFreeNodes;
2535
+ @interface NSDictionary<KeyType, ObjectType> (NSFileAttributes)
2536
+ - (unsigned long long)fileSize;
2537
+ - (nullable NSDate *)fileModificationDate;
2538
+ - (nullable NSString *)fileType;
2539
+ - (NSUInteger)filePosixPermissions;
2540
+ - (nullable NSString *)fileOwnerAccountName;
2541
+ - (nullable NSString *)fileGroupOwnerAccountName;
2542
+ - (NSInteger)fileSystemNumber;
2543
+ - (NSUInteger)fileSystemFileNumber;
2544
+ - (BOOL)fileExtensionHidden;
2545
+ - (OSType)fileHFSCreatorCode;
2546
+ - (OSType)fileHFSTypeCode;
2547
+ - (BOOL)fileIsImmutable;
2548
+ - (BOOL)fileIsAppendOnly;
2549
+ - (nullable NSDate *)fileCreationDate;
2550
+ - (nullable NSNumber *)fileOwnerAccountID;
2551
+ - (nullable NSNumber *)fileGroupOwnerAccountID;
2552
+ @end
2553
+
2554
+ NS_SWIFT_NAME(FileHandle)
2555
+ @interface NSFileHandle : NSObject <NSSecureCoding>
2556
+ + (nullable instancetype)fileHandleForWritingToURL:(NSURL *)url error:(NSError **)error API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2557
+ + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path;
2558
+ @property (readonly) int fileDescriptor;
2559
+ - (BOOL)writeData:(NSData *)data error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2560
+ - (BOOL)getOffset:(out unsigned long long *)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2561
+ - (BOOL)seekToEndReturningOffset:(out unsigned long long *_Nullable)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
2562
+ - (BOOL)synchronizeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
2563
+ - (BOOL)closeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
2564
+ - (void)writeData:(NSData *)data __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeData:error:")));
2565
+ @property (readonly) unsigned long long offsetInFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getOffset:error:")));
2566
+ - (unsigned long long)seekToEndOfFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:")));
2567
+ - (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
2568
+ - (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
2569
+ @end
2570
+ NS_SWIFT_NAME(ProcessInfo)
2571
+ @interface NSProcessInfo : NSObject
2572
+ @property (readonly, copy) NSString *globallyUniqueString;
2573
+ @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)));
2574
+ @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)));
2575
+ @property (class, readonly, strong) NSProcessInfo *processInfo;
2576
+ @property (copy) NSString *processName;
2577
+ @property (readonly) int processIdentifier;
2578
+ @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
2579
+ @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
2580
+ @end
2581
+ @interface NSProcessInfo (NSProcessInfoPlatform)
2582
+ @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)));
2583
+ @end
2584
+ typedef NS_ENUM(NSInteger, NSDecodingFailurePolicy) {
2585
+ /// A failure policy that directs the coder to raise an exception.
2586
+ ///
2587
+ /// 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.
2588
+ NSDecodingFailurePolicyRaiseException,
2589
+
2590
+ /// A failure policy that directs the coder to capture the failure as an error object.
2591
+ ///
2592
+ /// 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.
2593
+ NSDecodingFailurePolicySetErrorAndReturn,
2594
+ } API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
2595
+ @interface NSCoder : NSObject
2596
+
2597
+ /// Encodes a value of the given type at the given address.
2598
+ ///
2599
+ /// Subclasses must override this method, and match it with a subsequent ``decodeValueOfObjCType:at:size:`` message.
2600
+ /// When calling this method, `type` must contain exactly one type code.
2601
+ /// You should not use this method to encode Objective-C objects.
2602
+ - (void)encodeValueOfObjCType:(const char *)type at:(const void *)addr;
2603
+
2604
+ /// Encodes a given data object.
2605
+ ///
2606
+ /// Subclasses must override this method. This method must be matched by a subsequent ``decodeDataObject`` message.
2607
+ - (void)encodeDataObject:(NSData *)data;
2608
+
2609
+ /// Decodes and returns an `NSData` object that was previously encoded with ``encodeDataObject:``.
2610
+ ///
2611
+ /// Subclasses must override this method.
2612
+ - (nullable NSData *)decodeDataObject;
2613
+
2614
+ /// Decodes a single value of a known type from the specified data buffer.
2615
+ ///
2616
+ /// 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.
2617
+ /// Subclasses must override this method and provide an implementation to decode the value.
2618
+ /// This method matches an ``encodeValueOfObjCType:at:`` message used during encoding.
2619
+ - (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));
2620
+
2621
+ /// This method is present for historical reasons and is not used with keyed archivers.
2622
+ ///
2623
+ /// - Returns: The version in effect for the class named `className` or `NSNotFound` if no class named `className` exists.
2624
+ - (NSInteger)versionForClassName:(NSString *)className;
2625
+ @end
2626
+ @interface NSCoder (NSExtendedCoder)
2627
+
2628
+ /// Encodes an object.
2629
+ ///
2630
+ /// `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.
2631
+ /// This method must be matched by a subsequent ``decodeObject`` message.
2632
+ - (void)encodeObject:(nullable id)object;
2633
+
2634
+ /// An encoding method for subclasses to override to encode an interconnected group of objects, starting with the provided root object.
2635
+ ///
2636
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a subsequent ``decodeObject`` message.
2637
+ - (void)encodeRootObject:(id)rootObject;
2638
+
2639
+ /// An encoding method for subclasses to override such that it creates a copy, rather than a proxy, when decoded.
2640
+ ///
2641
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a corresponding ``decodeObject`` message.
2642
+ - (void)encodeBycopyObject:(nullable id)anObject;
2643
+
2644
+ /// An encoding method for subclasses to override such that it creates a proxy, rather than a copy, when decoded.
2645
+ ///
2646
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``. This method must be matched by a corresponding ``decodeObject`` message.
2647
+ - (void)encodeByrefObject:(nullable id)anObject;
2648
+
2649
+ /// An encoding method for subclasses to override to conditionally encode an object, preserving common references to it.
2650
+ ///
2651
+ /// In the overriding method, `object` should be encoded only if it's unconditionally encoded elsewhere (with any other `encode...Object:` method).
2652
+ /// `NSCoder`'s implementation simply invokes ``encodeObject:``.
2653
+ /// This method must be matched by a subsequent ``decodeObject`` message.
2654
+ - (void)encodeConditionalObject:(nullable id)object;
2655
+
2656
+ /// Encodes a series of values of potentially differing Objective-C types.
2657
+ ///
2658
+ /// `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.
2659
+ /// This method must be matched by a subsequent ``decodeValuesOfObjCTypes:`` message.
2660
+ /// You should not use this method to encode Objective-C objects.
2661
+ - (void)encodeValuesOfObjCTypes:(const char *)types, ...;
2662
+
2663
+ /// Encodes an array of the given Objective-C type, provided the number of items and a pointer.
2664
+ ///
2665
+ /// The values are encoded from the buffer beginning at `array`. `type` must contain exactly one type code.
2666
+ /// This method must be matched by a subsequent ``decodeArrayOfObjCType:count:at:`` message.
2667
+ /// You should not use this method to encode C arrays of Objective-C objects.
2668
+ - (void)encodeArrayOfObjCType:(const char *)type count:(NSUInteger)count at:(const void *)array;
2669
+
2670
+ /// Encodes a buffer of data of an unspecified type.
2671
+ ///
2672
+ /// The buffer to be encoded begins at `byteaddr`, and its length in bytes is given by `length`.
2673
+ /// This method must be matched by a corresponding ``decodeBytesWithReturnedLength:`` message.
2674
+ - (void)encodeBytes:(nullable const void *)byteaddr length:(NSUInteger)length;
2675
+
2676
+ /// Decodes and returns a previously-encoded object.
2677
+ ///
2678
+ /// `NSCoder`'s implementation invokes ``decodeValueOfObjCType:at:size:`` to decode the object data.
2679
+ /// Subclasses may need to override this method if they override any of the corresponding `encode...Object` methods.
2680
+ - (nullable id)decodeObject;
2681
+
2682
+ /// Decodes a previously-encoded object, returning an error if decoding fails.
2683
+ - (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");
2684
+
2685
+ /// Decodes a series of potentially different Objective-C types.
2686
+ ///
2687
+ /// `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.
2688
+ /// This method matches an ``encodeValuesOfObjCTypes:`` message used during encoding.
2689
+ /// You should not use this method to decode Objective-C objects.
2690
+ - (void)decodeValuesOfObjCTypes:(const char *)types, ...;
2691
+
2692
+ /// Decodes an array of `count` items, whose Objective-C type is given by `itemType`.
2693
+ ///
2694
+ /// 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.
2695
+ /// This method matches an ``encodeArrayOfObjCType:count:at:`` message used during encoding.
2696
+ /// You should not use this method to decode C arrays of Objective-C objects.
2697
+ - (void)decodeArrayOfObjCType:(const char *)itemType count:(NSUInteger)count at:(void *)array;
2698
+
2699
+ /// Decodes a buffer of data whose types are unspecified.
2700
+ ///
2701
+ /// 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.
2702
+ /// This method matches an ``encodeBytes:length:`` message used during encoding.
2703
+
2704
+ #if TARGET_OS_OSX
2705
+ /// Encodes a property list.
2706
+ ///
2707
+ /// `NSCoder`'s implementation invokes ``encodeValueOfObjCType:at:`` to encode the property list.
2708
+ /// This method must be matched by a subsequent ``decodePropertyList`` message.
2709
+ - (void)encodePropertyList:(id)aPropertyList;
2710
+
2711
+ /// Decodes a property list that was previously encoded with ``encodePropertyList:``.
2712
+ - (nullable id)decodePropertyList;
2713
+ #endif
2714
+
2715
+ /// This method is present for historical reasons and has no effect.
2716
+
2717
+ /// This method is present for historical reasons and has no effect.
2718
+ ///
2719
+ /// `NSCoder`'s implementation returns the default memory zone, as given by `NSDefaultMallocZone()`.
2720
+
2721
+ /// The system version in effect for the archive.
2722
+ ///
2723
+ /// During encoding, the current version. During decoding, the version that was in effect when the data was encoded.
2724
+ /// Subclasses that implement decoding must override this property to return the system version of the data being decoded.
2725
+ @property (readonly) unsigned int systemVersion;
2726
+
2727
+ /// A Boolean value that indicates whether the receiver supports keyed coding of objects.
2728
+ ///
2729
+ /// `NO` by default. Concrete subclasses that support keyed coding, such as `NSKeyedArchiver`, need to override this property to return `YES`.
2730
+ @property (readonly) BOOL allowsKeyedCoding;
2731
+
2732
+ /// Encodes an object and associates it with the string key.
2733
+ ///
2734
+ /// Subclasses must override this method to identify multiple encodings of `object` and encode a reference to `object` instead.
2735
+ - (void)encodeObject:(nullable id)object forKey:(NSString *)key;
2736
+
2737
+ /// An encoding method for subclasses to override to conditionally encode an object, preserving common references to it, only if it has been unconditionally encoded.
2738
+ ///
2739
+ /// Subclasses must override this method if they support keyed coding.
2740
+ - (void)encodeConditionalObject:(nullable id)object forKey:(NSString *)key;
2741
+
2742
+ /// Encodes a Boolean value and associates it with the string `key`.
2743
+ ///
2744
+ /// Subclasses must override this method if they perform keyed coding.
2745
+ - (void)encodeBool:(BOOL)value forKey:(NSString *)key;
2746
+
2747
+ /// Encodes a C integer value and associates it with the string key.
2748
+ ///
2749
+ /// Subclasses must override this method if they perform keyed coding.
2750
+ - (void)encodeInt:(int)value forKey:(NSString *)key;
2751
+
2752
+ /// Encodes a 32-bit integer value and associates it with the string key.
2753
+ ///
2754
+ /// Subclasses must override this method if they perform keyed coding.
2755
+ - (void)encodeInt32:(int32_t)value forKey:(NSString *)key;
2756
+
2757
+ /// Encodes a 64-bit integer value and associates it with the string key.
2758
+ ///
2759
+ /// Subclasses must override this method if they perform keyed coding.
2760
+ - (void)encodeInt64:(int64_t)value forKey:(NSString *)key;
2761
+
2762
+ /// Encodes a floating point value and associates it with the string key.
2763
+ ///
2764
+ /// Subclasses must override this method if they perform keyed coding.
2765
+ - (void)encodeFloat:(float)value forKey:(NSString *)key;
2766
+
2767
+ /// Encodes a double-precision floating point value and associates it with the string key.
2768
+ ///
2769
+ /// Subclasses must override this method if they perform keyed coding.
2770
+ - (void)encodeDouble:(double)value forKey:(NSString *)key;
2771
+
2772
+ /// Encodes a buffer of data, given its length and a pointer, and associates it with a string key.
2773
+ ///
2774
+ /// Subclasses must override this method if they perform keyed coding.
2775
+ - (void)encodeBytes:(nullable const uint8_t *)bytes length:(NSUInteger)length forKey:(NSString *)key;
2776
+
2777
+ /// Returns a Boolean value that indicates whether an encoded value is available for a string.
2778
+ ///
2779
+ /// Subclasses must override this method if they perform keyed coding.
2780
+ - (BOOL)containsValueForKey:(NSString *)key;
2781
+
2782
+ /// Decodes and returns a previously-encoded object that was associated with the string `key`.
2783
+ ///
2784
+ /// Subclasses must override this method if they perform keyed coding.
2785
+ - (nullable id)decodeObjectForKey:(NSString *)key;
2786
+
2787
+ /// Decodes and returns a previously-encoded object for the given key, returning an error if decoding fails.
2788
+ - (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");
2789
+
2790
+ /// Decodes and returns a boolean value that was previously encoded and associated with the string `key`.
2791
+ ///
2792
+ /// Subclasses must override this method if they perform keyed coding.
2793
+ - (BOOL)decodeBoolForKey:(NSString *)key;
2794
+
2795
+ /// Decodes and returns an int value that was previously encoded and associated with the string `key`.
2796
+ ///
2797
+ /// 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.
2798
+ - (int)decodeIntForKey:(NSString *)key;
2799
+
2800
+ /// Decodes and returns a 32-bit integer value that was previously encoded and associated with the string `key`.
2801
+ ///
2802
+ /// 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.
2803
+ - (int32_t)decodeInt32ForKey:(NSString *)key;
2804
+
2805
+ /// Decodes and returns a 64-bit integer value that was previously encoded and associated with the string `key`.
2806
+ ///
2807
+ /// Subclasses must override this method if they perform keyed coding.
2808
+ - (int64_t)decodeInt64ForKey:(NSString *)key;
2809
+
2810
+ /// Decodes and returns a float value that was previously encoded and associated with the string `key`.
2811
+ ///
2812
+ /// If the value was encoded as a double, the extra precision is lost. Subclasses must override this method if they perform keyed coding.
2813
+ - (float)decodeFloatForKey:(NSString *)key;
2814
+
2815
+ /// Decodes and returns a double value that was previously encoded and associated with the string `key`.
2816
+ ///
2817
+ /// Subclasses must override this method if they perform keyed coding.
2818
+ - (double)decodeDoubleForKey:(NSString *)key;
2819
+
2820
+ /// Decodes a buffer of data that was previously encoded with ``encodeBytes:length:forKey:`` and associated with the string `key`.
2821
+ ///
2822
+ /// 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.
2823
+ - (nullable const uint8_t *)decodeBytesForKey:(NSString *)key returnedLength:(nullable NSUInteger *)lengthp NS_RETURNS_INNER_POINTER; // returned bytes immutable!
2824
+
2825
+ /// Decode bytes from the decoder. The length of the bytes must be greater than or equal to the `length` parameter.
2826
+ /// 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`.
2827
+
2828
+ /// Decode bytes from the decoder for a given key. The length of the bytes must be greater than or equal to the `length` parameter.
2829
+ /// 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`.
2830
+
2831
+ /// Encodes an integer value and associates it with the string key.
2832
+ ///
2833
+ /// Subclasses must override this method if they perform keyed coding.
2834
+ - (void)encodeInteger:(NSInteger)value forKey:(NSString *)key API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2835
+
2836
+ /// Decodes and returns an NSInteger value that was previously encoded and associated with the string `key`.
2837
+ ///
2838
+ /// 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.
2839
+ - (NSInteger)decodeIntegerForKey:(NSString *)key API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2840
+
2841
+ /// Indicates whether the archiver requires all archived classes to resist object substitution attacks.
2842
+ ///
2843
+ /// Secure coders check a set of allowed classes before decoding objects, and all objects must implement `NSSecureCoding`.
2844
+ // 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.
2845
+ @property (readonly) BOOL requiresSecureCoding API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2846
+
2847
+ /// Decodes an object for the key, restricted to the specified class.
2848
+ ///
2849
+ /// 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.
2850
+ /// If the coder does not require secure coding, then the class argument is ignored.
2851
+ // 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.
2852
+ - (nullable id)decodeObjectOfClass:(Class)aClass forKey:(NSString *)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2853
+
2854
+ /// Decodes an object for the key and restricted class, returning an error if decoding fails.
2855
+ - (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");
2856
+
2857
+ /**
2858
+ 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.
2859
+
2860
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2861
+
2862
+ 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.
2863
+ */
2864
+
2865
+ /**
2866
+ 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.
2867
+
2868
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2869
+
2870
+ 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.
2871
+ */
2872
+
2873
+ /// Decodes an object for the key, restricted to the specified classes.
2874
+ ///
2875
+ /// The class of the object may be any class in the provided `NSSet`, or a subclass of any class in the set.
2876
+ // 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:.
2877
+ - (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;
2878
+
2879
+ /// Decodes an object for the key and restricted classes, returning an error if decoding fails.
2880
+ - (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");
2881
+
2882
+ /**
2883
+ 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.
2884
+
2885
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2886
+
2887
+ 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.
2888
+ */
2889
+
2890
+ /**
2891
+ 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.
2892
+
2893
+ Requires \c NSSecureCoding otherwise an exception is thrown and sets the \c decodingFailurePolicy to \c NSDecodingFailurePolicySetErrorAndReturn.
2894
+
2895
+ 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.
2896
+ */
2897
+
2898
+ /// Returns a decoded property list for the specified key.
2899
+ ///
2900
+ /// This method calls ``decodeObjectOfClasses:forKey:`` with a set allowing only property list types.
2901
+ // Calls -decodeObjectOfClasses:forKey: with a set allowing only property list types.
2902
+ - (nullable id)decodePropertyListForKey:(NSString *)key API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2903
+
2904
+ /// The set of coded classes allowed for secure coding.
2905
+ ///
2906
+ /// Secure coders check this set of allowed classes before decoding objects, and all objects must implement `NSSecureCoding`.
2907
+ // Get the current set of allowed classes.
2908
+ @property (nullable, readonly, copy) NSSet<Class> *allowedClasses API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0));
2909
+
2910
+ /*
2911
+ Typically, you would want to call this method in your -initWithCoder: implementation when you detect situations like:
2912
+ - lack of secure coding
2913
+ - corruption of your data
2914
+ - domain validation failures
2915
+
2916
+ After calling -failWithError: within your -initWithCoder: implementation, you should clean up and return nil as early as possible.
2917
+
2918
+ 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:
2919
+ A -decodeTopLevelObjectForKey:error:
2920
+ B -initWithCoder:
2921
+ C -decodeObjectForKey:
2922
+ D -initWithCoder:
2923
+ E -decodeObjectForKey:
2924
+ F -failWithError:
2925
+
2926
+ 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.
2927
+
2928
+ NSCoder implementations support two mechanisms for the stack-unwinding from F to A:
2929
+ - forced (NSException based)
2930
+ - particpatory (error based)
2931
+
2932
+ The kind of unwinding you get is determined by the decodingFailurePolicy property of this NSCoder (which defaults to NSDecodingFailurePolicyRaiseException to match historical behavior).
2933
+ */
2934
+
2935
+ /// Signals to this coder that the decode operation has failed.
2936
+ ///
2937
+ /// 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.
2938
+ ///
2939
+ /// This method is only meaningful to call for decodes.
2940
+ ///
2941
+ /// The effect of calling this method depends on the value of ``decodingFailurePolicy``, as follows:
2942
+ ///
2943
+ /// - If the policy is ``DecodingFailurePolicy/raiseException``, calling this method throws an exception immediately. Swift code cannot catch this kind of exception.
2944
+ /// - 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.
2945
+ ///
2946
+ /// After calling `failWithError:` within your ``NSCoding/init(coder:)`` implementation, you should clean up and return `nil` as early as possible.
2947
+ ///
2948
+ /// - Parameter error: An error that indicates why decoding failed.
2949
+
2950
+ /// The action the coder should take when decoding fails.
2951
+ ///
2952
+ /// A decode call can fail for the following reasons:
2953
+ ///
2954
+ /// - The keyed archive data is corrupt or missing.
2955
+ /// - 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.
2956
+ /// - 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.
2957
+ @property (readonly) NSDecodingFailurePolicy decodingFailurePolicy API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
2958
+
2959
+ /// An error in the top-level decode.
2960
+ ///
2961
+ /// 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.
2962
+ ///
2963
+ /// 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.
2964
+ @property (nullable, readonly, copy) NSError *error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
2965
+
1100
2966
  @end
1101
- @interface NSFileManager : NSObject
1102
- - (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(nullable BOOL *)isDirectory;
1103
- - (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)));
1104
- - (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)));
1105
- - (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)));
1106
- @property (class, readonly, strong) NSFileManager *defaultManager;
1107
- - (BOOL)removeItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1108
- - (BOOL)setAttributes:(NSDictionary<NSFileAttributeKey, id> *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1109
- - (BOOL)moveItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1110
- - (BOOL)createDirectoryAtPath:(NSString *)path withIntermediateDirectories:(BOOL)createIntermediates attributes:(nullable NSDictionary<NSFileAttributeKey, id> *)attributes error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1111
- - (nullable NSArray<NSString *> *)contentsOfDirectoryAtPath:(NSString *)path error:(NSError **)error __attribute__((availability(ios,introduced=2.0)));
1112
- - (nullable NSArray<NSString *> *)subpathsOfDirectoryAtPath:(NSString *)path error:(NSError **)error;
1113
- - (nullable NSDictionary<NSFileAttributeKey, id> *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error;
1114
- - (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)));
1115
- - (BOOL)fileExistsAtPath:(NSString *)path;
1116
- - (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)));
1117
- - (nullable NSData *)contentsAtPath:(NSString *)path;
2967
+ @interface NSCoder (NSExtendedCoderPrimitives)
2968
+ - (nullable void *)decodeBytesWithReturnedLength:(NSUInteger *)lengthp NS_RETURNS_INNER_POINTER;
2969
+ - (void)setObjectZone:(nullable NSZone *)zone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
2970
+ - (nullable NSZone *)objectZone NS_AUTOMATED_REFCOUNT_UNAVAILABLE;
2971
+ - (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;
2972
+ - (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;
2973
+ - (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;
2974
+ - (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;
2975
+ - (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;
2976
+ - (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;
2977
+ - (void)failWithError:(NSError *)error API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1118
2978
  @end
1119
- NS_SWIFT_NAME(FileHandle)
1120
- @interface NSFileHandle : NSObject <NSSecureCoding>
1121
- + (nullable instancetype)fileHandleForWritingAtPath:(NSString *)path;
1122
- @property (readonly) int fileDescriptor;
1123
- - (BOOL)writeData:(NSData *)data error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1124
- - (BOOL)getOffset:(out unsigned long long *)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1125
- - (BOOL)seekToEndReturningOffset:(out unsigned long long *_Nullable)offsetInFile error:(out NSError **)error __attribute__((availability(ios,introduced=13.0))) NS_REFINED_FOR_SWIFT;
1126
- - (BOOL)synchronizeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
1127
- - (BOOL)closeAndReturnError:(out NSError **)error __attribute__((availability(ios,introduced=13.0)));
1128
- - (void)writeData:(NSData *)data __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="writeData:error:")));
1129
- @property (readonly) unsigned long long offsetInFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="getOffset:error:")));
1130
- - (unsigned long long)seekToEndOfFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="seekToEndReturningOffset:error:")));
1131
- - (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
1132
- - (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
2979
+ @interface NSCoder (SwiftFoundationErrorStorage)
2980
+ - (void)__setError:(NSError *)error NS_SWIFT_NAME(_setDecodeError(_:));
1133
2981
  @end
1134
- NS_SWIFT_NAME(ProcessInfo)
1135
- @interface NSProcessInfo : NSObject
1136
- @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)));
1137
- @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)));
1138
- @property (class, readonly, strong) NSProcessInfo *processInfo;
1139
- @property (copy) NSString *processName;
1140
- @property (readonly) int processIdentifier;
1141
- @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
1142
- @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
2982
+ @interface NSCoder (NSTypedstreamCompatibility)
2983
+
2984
+ /// Encodes an old-style object onto the coder.
2985
+ ///
2986
+ /// @DeprecationSummary {
2987
+ /// Apple discourages the use of this symbol.
2988
+ /// }
2989
+ ///
2990
+ /// 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.
2991
+ - (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));
2992
+
2993
+ /// Decodes an object previously written with ``encodeNXObject:``.
2994
+ ///
2995
+ /// @DeprecationSummary {
2996
+ /// Apple discourages the use of this symbol.
2997
+ /// }
2998
+ ///
2999
+ /// 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.
3000
+ - (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));
3001
+
1143
3002
  @end
1144
- @interface NSProcessInfo (NSProcessInfoPlatform)
1145
- @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)));
3003
+ @interface NSCoder (SwiftFoundationCoding)
3004
+ - (void)encodePropertyList:(id)propertyList;
3005
+ - (nullable id)decodePropertyList;
3006
+ - (NSArray *)_decodeArrayOfObjectsForKey:(NSString *)key NS_SWIFT_NAME(_decodeArrayOfObjectsForKey(_:));
3007
+ - (nullable id)_decodePropertyListForKey:(NSString *)key NS_SWIFT_NAME(_decodePropertyListForKey(_:));
1146
3008
  @end
1147
- @interface NSCoder : NSObject
1148
- - (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");
1149
- - (void)encodeObject:(nullable id)object forKey:(NSString *)key;
1150
- - (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)));
3009
+ @interface NSCoder(NSDeprecated)
3010
+ /// Decodes a single value, whose Objective-C type is given by `type`.
3011
+ ///
3012
+ /// @DeprecationSummary {
3013
+ /// Use ``decodeValueOfObjCType:at:size:`` instead.
3014
+ /// }
3015
+ ///
3016
+ /// This method is unsafe because it could potentially cause buffer overruns.
3017
+ - (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));
3018
+
1151
3019
  @end
1152
3020
  NS_SWIFT_NAME(NSKeyedArchiver)
1153
3021
  @interface NSKeyedArchiver : NSCoder
@@ -1168,6 +3036,18 @@ NS_SWIFT_NAME(InputStream)
1168
3036
  NS_SWIFT_NAME(OutputStream)
1169
3037
  @interface NSOutputStream : NSStream
1170
3038
  @end
3039
+ typedef NS_OPTIONS(NSUInteger, NSStreamEvent) {
3040
+ NSStreamEventNone = 0,
3041
+ NSStreamEventOpenCompleted = 1UL << 0,
3042
+ NSStreamEventHasBytesAvailable = 1UL << 1,
3043
+ NSStreamEventHasSpaceAvailable = 1UL << 2,
3044
+ NSStreamEventErrorOccurred = 1UL << 3,
3045
+ NSStreamEventEndEncountered = 1UL << 4
3046
+ };
3047
+ @protocol NSStreamDelegate <NSObject>
3048
+ @optional
3049
+ - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
3050
+ @end
1171
3051
  typedef NS_ENUM(NSUInteger, NSDateFormatterBehavior) { NSDateFormatterBehaviorDefault = 0, NSDateFormatterBehavior10_4 = 1040 };
1172
3052
  NS_SWIFT_NAME(Formatter)
1173
3053
  @interface NSFormatter : NSObject <NSCopying, NSCoding>
@@ -1259,13 +3139,16 @@ __attribute__((availability(ios,introduced=6.0)))
1259
3139
  - (void)cache:(NSCache *)cache willEvictObject:(id)obj;
1260
3140
  @end
1261
3141
  @interface NSCache<KeyType, ObjectType> : NSObject
3142
+ @property (copy) NSString *name;
3143
+ @property (nullable, assign) id<NSCacheDelegate> delegate;
3144
+ - (nullable ObjectType)objectForKey:(KeyType)key;
3145
+ - (void)setObject:(ObjectType)obj forKey:(KeyType)key;
1262
3146
  - (void)setObject:(ObjectType)obj forKey:(KeyType)key cost:(NSUInteger)g;
1263
- - (void)removeAllObjects;
1264
3147
  - (void)removeObjectForKey:(KeyType)key;
1265
- - (nullable ObjectType)objectForKey:(KeyType)key;
3148
+ - (void)removeAllObjects;
1266
3149
  @property NSUInteger totalCostLimit;
1267
3150
  @property NSUInteger countLimit;
1268
- @property (nullable, assign) id<NSCacheDelegate> delegate;
3151
+ @property BOOL evictsObjectsWithDiscardedContent;
1269
3152
  @end
1270
3153
  @interface NSMapTable<KeyType, ObjectType> : NSObject <NSCopying, NSSecureCoding, NSFastEnumeration>
1271
3154
  - (void)removeAllObjects;
@@ -1347,7 +3230,8 @@ FOUNDATION_EXPORT NSURLResourceKey const NSURLContentModificationDateKey __a
1347
3230
  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)));
1348
3231
  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)));
1349
3232
  FOUNDATION_EXPORT NSErrorDomain const NSPOSIXErrorDomain;
1350
- FOUNDATION_EXPORT NSExceptionName const NSInternalInconsistencyException;
3233
+ FOUNDATION_EXPORT NSErrorDomain const NSOSStatusErrorDomain;
3234
+ FOUNDATION_EXPORT NSErrorDomain const NSMachErrorDomain;
1351
3235
  @interface NSTextCheckingResult : NSObject <NSCopying, NSSecureCoding>
1352
3236
  @property (readonly) NSRange range;
1353
3237
  - (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)));
@@ -1376,6 +3260,7 @@ typedef NS_OPTIONS(NSUInteger, NSMatchingFlags) {
1376
3260
  NSMatchingInternalError = 1 << 4
1377
3261
  };
1378
3262
  @interface NSRegularExpression : NSObject <NSCopying, NSSecureCoding>
3263
+ - (NSUInteger)numberOfMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range;
1379
3264
  + (nullable NSRegularExpression *)regularExpressionWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error;
1380
3265
  - (void)enumerateMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range usingBlock:(void (NS_NOESCAPE ^)(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL *stop))block;
1381
3266
  @end
@@ -1486,6 +3371,7 @@ NS_ROOT_CLASS
1486
3371
  - (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.");
1487
3372
  - (void)addObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options context:(nullable void *)context;
1488
3373
  - (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)));
3374
+ - (void)removeObserver:(NSObject *)observer forKeyPath:(NSString *)keyPath;
1489
3375
  @end
1490
3376
  @interface NSBlockOperation : NSOperation
1491
3377
  + (instancetype)blockOperationWithBlock:(void (NS_SWIFT_SENDABLE ^)(void))block;
@@ -1503,20 +3389,20 @@ FOUNDATION_EXPORT NSString * const NSKeyedArchiveRootObjectKey __attribute__((av
1503
3389
  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)));
1504
3390
  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)));
1505
3391
  #define NSURLResponseUnknownLength ((long long)-1)
1506
- @class NSURLProtectionSpace;
1507
- @interface NSURLAuthenticationChallenge : NSObject <NSSecureCoding>
1508
- @property (readonly, copy) NSURLProtectionSpace *protectionSpace;
1509
- @property (readonly) NSInteger previousFailureCount;
1510
- @end
1511
- @interface NSURLProtectionSpace : NSObject <NSSecureCoding, NSCopying>
1512
- @property (readonly, copy) NSString *authenticationMethod;
1513
- @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)));
1514
- @end
1515
3392
  @interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
1516
3393
  @property (readonly, copy) NSURLResponse *response;
1517
3394
  @property (readonly, copy) NSData *data;
1518
3395
  @end
1519
- 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)));
3396
+ #if TARGET_OS_IPHONE
3397
+ #if __has_include(<CFNetwork/CFNetwork.h>)
3398
+ #ifndef __swift__
3399
+ // the swift CFNetwork module imports Foundation; keep this edge for C/ObjC.
3400
+ #import <CFNetwork/CFNetwork.h>
3401
+ #endif
3402
+ #endif
3403
+ #else
3404
+ #import <CoreServices/CoreServices.h>
3405
+ #endif
1520
3406
  FOUNDATION_EXPORT NSErrorDomain const NSURLErrorDomain;
1521
3407
  NS_ERROR_ENUM(NSURLErrorDomain)
1522
3408
  {
@@ -1574,3 +3460,712 @@ NS_ERROR_ENUM(NSURLErrorDomain)
1574
3460
  NSURLErrorBackgroundSessionInUseByAnotherProcess __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) = -996,
1575
3461
  NSURLErrorBackgroundSessionWasDisconnected __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)))= -997,
1576
3462
  };
3463
+
3464
+ /*
3465
+ NSFileVersion.h
3466
+ Copyright (c) 2010-2019, Apple Inc.
3467
+ All rights reserved.
3468
+ */
3469
+
3470
+
3471
+
3472
+ @class NSArray<ObjectType>, NSDate, NSDictionary, NSError, NSString, NSURL, NSPersonNameComponents;
3473
+
3474
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3475
+
3476
+ /// Options for adding a new file version.
3477
+ typedef NS_OPTIONS(NSUInteger, NSFileVersionAddingOptions) {
3478
+
3479
+ /// 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.
3480
+ NSFileVersionAddingByMoving = 1 << 0
3481
+
3482
+ };
3483
+
3484
+ /// Options for replacing a file version.
3485
+ typedef NS_OPTIONS(NSUInteger, NSFileVersionReplacingOptions) {
3486
+
3487
+ /// 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.
3488
+ NSFileVersionReplacingByMoving = 1 << 0
3489
+
3490
+ };
3491
+
3492
+ // 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.
3493
+
3494
+ /// A snapshot of a file at a specific point in time.
3495
+ ///
3496
+ /// Use the methods of this class to access, create, and manage file revisions in your app.
3497
+ ///
3498
+ /// 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.
3499
+ ///
3500
+ /// 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.
3501
+ ///
3502
+ /// 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.
3503
+ API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0))
3504
+ @interface NSFileVersion : NSObject
3505
+
3506
+ /// Returns the most recent version object for the file at the specified URL.
3507
+ ///
3508
+ /// - Parameter url: The URL of the file whose version object you want.
3509
+ /// - Returns: The version object representing the current version of the file or nil if there is no such file.
3510
+ + (nullable NSFileVersion *)currentVersionOfItemAtURL:(NSURL *)url;
3511
+
3512
+ /// Returns all versions of the specified file except the current version.
3513
+ ///
3514
+ /// - Parameter url: The URL of the file whose versions you want.
3515
+ /// - 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.
3516
+ ///
3517
+ /// 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.
3518
+ + (nullable NSArray<NSFileVersion *> *)otherVersionsOfItemAtURL:(NSURL *)url;
3519
+
3520
+ /// Returns an array of version objects that are currently in conflict for the specified URL.
3521
+ ///
3522
+ /// - Parameter url: The URL of the file that has associated version objects.
3523
+ /// - Returns: An array of NSFileVersion objects that represent the versions in conflict or nil if the file at URL does not exist.
3524
+ + (nullable NSArray<NSFileVersion *> *)unresolvedConflictVersionsOfItemAtURL:(NSURL *)url;
3525
+
3526
+ /// 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.
3527
+ ///
3528
+ /// 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.
3529
+ ///
3530
+ /// 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.
3531
+ + (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));
3532
+
3533
+ /// Returns the version of the file that has the specified persistent ID.
3534
+ ///
3535
+ /// - Parameter url: The URL of the file whose version you want.
3536
+ /// - Parameter persistentIdentifier: The persistent ID of the NSFileVersion object you want.
3537
+ /// - Returns: The file version object with the specified ID or nil if no such version object exists.
3538
+ + (nullable NSFileVersion *)versionOfItemAtURL:(NSURL *)url forPersistentIdentifier:(id)persistentIdentifier;
3539
+
3540
+ /// Creates a version of the file at the specified location.
3541
+ ///
3542
+ /// 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.
3543
+ ///
3544
+ /// 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.
3545
+ ///
3546
+ /// You can add versions only on Mac OS X.
3547
+ + (nullable NSFileVersion *)addVersionOfItemAtURL:(NSURL *)url withContentsOfURL:(NSURL *)contentsURL options:(NSFileVersionAddingOptions)options error:(NSError **)outError API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3548
+
3549
+ /// Creates and returns a temporary directory to use for saving the contents of the file.
3550
+ ///
3551
+ /// 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.
3552
+ + (NSURL *)temporaryDirectoryURLForNewVersionOfItemAtURL:(NSURL *)url API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3553
+
3554
+ /// The URL identifying the location of the file associated with the file version object.
3555
+ ///
3556
+ /// 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.
3557
+ ///
3558
+ /// 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.
3559
+ @property (readonly, copy) NSURL *URL;
3560
+
3561
+ /// The string containing the user-presentable name of the file version.
3562
+ ///
3563
+ /// When displaying different versions of a file to the user, you should present this string to the user instead of the version's URL.
3564
+ @property (nullable, readonly, copy) NSString *localizedName;
3565
+
3566
+ /// The user-presentable name of the computer on which the revision was saved.
3567
+ ///
3568
+ /// 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.
3569
+ @property (nullable, readonly, copy) NSString *localizedNameOfSavingComputer;
3570
+
3571
+ /// 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.
3572
+ @property (nullable, readonly, copy) NSPersonNameComponents *originatorNameComponents API_AVAILABLE(macosx(10.12), ios(10.0)) API_UNAVAILABLE(watchos, tvos);
3573
+
3574
+ /// The modification date of the version, or possibly nil if the receiver's storage has been deleted.
3575
+ @property (nullable, readonly, copy) NSDate *modificationDate;
3576
+
3577
+ /// The identifier for this version of the file.
3578
+ ///
3579
+ /// 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.
3580
+ @property (readonly, retain) id<NSCoding> persistentIdentifier;
3581
+
3582
+ /// A Boolean value indicating whether the contents of the version are in conflict with the contents of another version.
3583
+ ///
3584
+ /// 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.
3585
+ @property (readonly, getter=isConflict) BOOL conflict;
3586
+
3587
+ /// A Boolean value that indicates whether the conflict has been resolved.
3588
+ ///
3589
+ /// 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.
3590
+ ///
3591
+ /// 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.
3592
+ @property (getter=isResolved) BOOL resolved;
3593
+
3594
+ /// A Boolean value that specifies whether the system can delete the associated file at some future time.
3595
+ ///
3596
+ /// 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.
3597
+ ///
3598
+ /// 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.
3599
+ ///
3600
+ /// Versions can be discardable only on Mac OS X.
3601
+ @property (getter=isDiscardable) BOOL discardable API_AVAILABLE(macos(10.7)) API_UNAVAILABLE(ios, watchos, tvos);
3602
+
3603
+ /// 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.
3604
+ @property (readonly) BOOL hasLocalContents API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3605
+
3606
+ /// 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.
3607
+ @property (readonly) BOOL hasThumbnail API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3608
+
3609
+ /// Replace the contents of the specified file with the contents of the current version's file.
3610
+ ///
3611
+ /// 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.
3612
+ ///
3613
+ /// When you use NSFileVersionReplacingByMoving you remove a version of the file, and should do it as part of a coordinated write to the file.
3614
+ - (nullable NSURL *)replaceItemAtURL:(NSURL *)url options:(NSFileVersionReplacingOptions)options error:(NSError **)error;
3615
+
3616
+ /// Remove this version object and its associated file from the version store.
3617
+ ///
3618
+ /// 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.
3619
+ ///
3620
+ /// 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.
3621
+ - (BOOL)removeAndReturnError:(NSError **)outError;
3622
+
3623
+ /// Removes all versions of a file, except the current one, from the version store.
3624
+ ///
3625
+ /// This method removes all versions except the current one from the version store, freeing up the associated storage space.
3626
+ ///
3627
+ /// 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.
3628
+ + (BOOL)removeOtherVersionsOfItemAtURL:(NSURL *)url error:(NSError **)outError;
3629
+
3630
+ @end
3631
+
3632
+ NS_HEADER_AUDIT_END(nullability, sendability)
3633
+
3634
+ /*
3635
+ NSURLProtectionSpace.h
3636
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3637
+
3638
+ Public header file.
3639
+ */
3640
+
3641
+ #import <Security/Security.h>
3642
+
3643
+ @class NSString;
3644
+ @class NSArray<ObjectType>;
3645
+ @class NSData;
3646
+
3647
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3648
+
3649
+ /// The protocol for HTTP.
3650
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTP API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3651
+
3652
+ /// The protocol for HTTPS.
3653
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPS API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3654
+
3655
+ /// The protocol for FTP.
3656
+ 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));
3657
+
3658
+ /// The proxy type for HTTP proxies.
3659
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3660
+
3661
+ /// The proxy type for HTTPS proxies.
3662
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceHTTPSProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3663
+
3664
+ /// The proxy type for FTP proxies.
3665
+ 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));
3666
+
3667
+ /// The proxy type for SOCKS proxies.
3668
+ FOUNDATION_EXPORT NSString * const NSURLProtectionSpaceSOCKSProxy API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3669
+
3670
+ /// The default authentication method for a protocol.
3671
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodDefault API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3672
+
3673
+ /// HTTP basic authentication. Equivalent to ``NSURLAuthenticationMethodDefault`` for HTTP.
3674
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTTPBasic API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3675
+
3676
+ /// HTTP digest authentication.
3677
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTTPDigest API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3678
+
3679
+ /// HTML form authentication. Applies to any protocol.
3680
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodHTMLForm API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0));
3681
+
3682
+ /// NTLM authentication.
3683
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodNTLM API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3684
+
3685
+ /// Negotiate authentication.
3686
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodNegotiate API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
3687
+
3688
+ /// SSL client certificate. Applies to any protocol.
3689
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodClientCertificate API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3690
+
3691
+ /// `SecTrustRef` validation required. Applies to any protocol.
3692
+ FOUNDATION_EXPORT NSString * const NSURLAuthenticationMethodServerTrust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3693
+
3694
+ @class NSURLProtectionSpaceInternal;
3695
+
3696
+ /// A server or an area on a server, commonly referred to as a realm, that requires authentication.
3697
+ ///
3698
+ /// 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.
3699
+ ///
3700
+ /// > Note:
3701
+ /// > 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.
3702
+ NS_SWIFT_SENDABLE
3703
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3704
+ @interface NSURLProtectionSpace : NSObject <NSSecureCoding, NSCopying>
3705
+ {
3706
+ @private
3707
+ NSURLProtectionSpaceInternal *_internal;
3708
+ }
3709
+
3710
+ /// Creates a protection space object from the given host, port, protocol, realm, and authentication method.
3711
+ ///
3712
+ /// - Parameters:
3713
+ /// - host: The host name for the protection space object.
3714
+ /// - 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.
3715
+ /// - 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.
3716
+ /// - 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.
3717
+ /// - authenticationMethod: The type of authentication to use. `authenticationMethod` should be set to one of the authentication method constants or `nil` to use the default.
3718
+ /// - Returns: A new protection space object, initialized with the given host, port, protocol, realm, and authentication method.
3719
+ - (instancetype)initWithHost:(NSString *)host port:(NSInteger)port protocol:(nullable NSString *)protocol realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod;
3720
+
3721
+ /// Creates a protection space object representing a proxy server.
3722
+ ///
3723
+ /// - Parameters:
3724
+ /// - host: The host of the proxy server for the protection space object.
3725
+ /// - 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.
3726
+ /// - type: The type of proxy server.
3727
+ /// - 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.
3728
+ /// - authenticationMethod: The type of authentication to use. `authenticationMethod` should be set to one of the authentication method constants or `nil` to use the default.
3729
+ /// - Returns: A new protection space object, with the given host, port, proxy type, realm, and authentication method.
3730
+ - (instancetype)initWithProxyHost:(NSString *)host port:(NSInteger)port type:(nullable NSString *)type realm:(nullable NSString *)realm authenticationMethod:(nullable NSString *)authenticationMethod;
3731
+
3732
+ /// The receiver's authentication realm.
3733
+ ///
3734
+ /// This value is `nil` if no realm has been set. A realm is generally only specified for HTTP and HTTPS authentication.
3735
+ @property (nullable, readonly, copy) NSString *realm;
3736
+
3737
+ /// A Boolean value that indicates whether the credentials for the protection space can be sent securely.
3738
+ @property (readonly) BOOL receivesCredentialSecurely;
3739
+
3740
+ /// A Boolean value that indicates whether this authenticating protection space is a proxy server.
3741
+ @property (readonly) BOOL isProxy;
3742
+
3743
+ /// The receiver's host.
3744
+ @property (readonly, copy) NSString *host;
3745
+
3746
+ /// The receiver's port.
3747
+ @property (readonly) NSInteger port;
3748
+
3749
+ /// The receiver's proxy type.
3750
+ ///
3751
+ /// This value is `nil` if the receiver does not represent a proxy protection space.
3752
+ @property (nullable, readonly, copy) NSString *proxyType;
3753
+
3754
+ /// The receiver's protocol.
3755
+ ///
3756
+ /// This value is `nil` if the receiver represents a proxy protection space.
3757
+ @property (nullable, readonly, copy) NSString *protocol;
3758
+
3759
+ /// The authentication method used by the receiver.
3760
+ @property (readonly, copy) NSString *authenticationMethod;
3761
+
3762
+ @end
3763
+
3764
+ /// This category supplies additional information for use when a client certificate is required by the server in order to complete authentication.
3765
+ @interface NSURLProtectionSpace(NSClientCertificateSpace)
3766
+
3767
+ /// The acceptable certificate-issuing authorities for client certificate authentication.
3768
+ ///
3769
+ /// Issuers are identified by their distinguished name and returned as DER encoded data.
3770
+ /// This value is `nil` if the authentication method is not `NSURLAuthenticationMethodClientCertificate`.
3771
+ @property (nullable, readonly, copy) NSArray<NSData *> *distinguishedNames API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3772
+
3773
+ @end
3774
+
3775
+ /// This category supplies additional information for use by the client to evaluate whether to trust a given server during a security handshake.
3776
+ @interface NSURLProtectionSpace(NSServerTrustValidationSpace)
3777
+
3778
+ /// A representation of the server's SSL transaction state.
3779
+ ///
3780
+ /// This value is `nil` if the authentication method is not `NSURLAuthenticationMethodServerTrust`.
3781
+ @property (nullable, readonly) SecTrustRef serverTrust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3782
+
3783
+ @end
3784
+
3785
+ NS_HEADER_AUDIT_END(nullability, sendability)
3786
+
3787
+ /*
3788
+ NSURLCredential.h
3789
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3790
+
3791
+ Public header file.
3792
+ */
3793
+
3794
+ #import <Security/Security.h>
3795
+
3796
+ @class NSString;
3797
+ @class NSArray;
3798
+
3799
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3800
+
3801
+ /// Constants defining how long a credential will be kept around.
3802
+ ///
3803
+ /// - `NSURLCredentialPersistenceNone`: This credential won't be saved.
3804
+ /// - `NSURLCredentialPersistenceForSession`: This credential will only be stored for this session.
3805
+ /// - `NSURLCredentialPersistencePermanent`: This credential will be stored permanently. Note: Whereas in Mac OS X any application
3806
+ /// can access any credential provided the user gives permission, in iPhone OS an application can access only its own credentials.
3807
+ /// - `NSURLCredentialPersistenceSynchronizable`: This credential will be stored permanently. Additionally, this credential will be
3808
+ /// distributed to other devices based on the owning AppleID.
3809
+
3810
+ typedef NS_ENUM(NSUInteger, NSURLCredentialPersistence) {
3811
+ /// The credential should not be stored.
3812
+ NSURLCredentialPersistenceNone,
3813
+ /// The credential should be stored only for this session.
3814
+ NSURLCredentialPersistenceForSession,
3815
+ /// The credential should be stored in the keychain.
3816
+ NSURLCredentialPersistencePermanent,
3817
+ /// The credential should be stored permanently in the keychain, and in addition should be distributed to other devices based on the owning Apple ID.
3818
+ NSURLCredentialPersistenceSynchronizable API_AVAILABLE(macos(10.8), ios(6.0), watchos(2.0), tvos(9.0))
3819
+ };
3820
+
3821
+ @class NSURLCredentialInternal;
3822
+
3823
+ /// An authentication credential consisting of information specific to the type of credential and the type of persistent storage to use, if any.
3824
+ ///
3825
+ /// The URL Loading System supports password-based user credentials, certificate-based user credentials, and certificate-based server credentials.
3826
+ ///
3827
+ /// 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.
3828
+ ///
3829
+ /// > Note:
3830
+ /// > 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.
3831
+ NS_SWIFT_SENDABLE
3832
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3833
+ @interface NSURLCredential : NSObject <NSSecureCoding, NSCopying>
3834
+ {
3835
+ @private
3836
+ __strong NSURLCredentialInternal *_internal;
3837
+ }
3838
+
3839
+ /// The credential's persistence setting.
3840
+ @property (readonly) NSURLCredentialPersistence persistence;
3841
+
3842
+ @end
3843
+
3844
+ /// This category defines the methods available to an `NSURLCredential` created to represent an internet password credential.
3845
+ ///
3846
+ /// These are most commonly used for resources that require a username and password combination.
3847
+ @interface NSURLCredential(NSInternetPassword)
3848
+
3849
+ /// Creates a URL credential instance initialized with a given user name and password, using a given persistence setting.
3850
+ ///
3851
+ /// - Parameter user: The user for the credential.
3852
+ /// - Parameter password: The password for `user`.
3853
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3854
+ - (instancetype)initWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;
3855
+
3856
+ /// Creates a new `NSURLCredential` with a user and password.
3857
+ ///
3858
+ /// - Parameter user: The user for the credential.
3859
+ /// - Parameter password: The password for `user`.
3860
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3861
+ /// - Returns: The new autoreleased `NSURLCredential`.
3862
+ + (NSURLCredential *)credentialWithUser:(NSString *)user password:(NSString *)password persistence:(NSURLCredentialPersistence)persistence;
3863
+
3864
+ /// The credential's user name.
3865
+ @property (nullable, readonly, copy) NSString *user;
3866
+
3867
+ /// The credential's password.
3868
+ ///
3869
+ /// You should only access this property if you need the actual password value. If you only need to know if there is
3870
+ /// a password, use `hasPassword`. Accessing this property may result in prompting the user for access.
3871
+ @property (nullable, readonly, copy) NSString *password;
3872
+
3873
+ /// A Boolean value that indicates whether the credential has a password.
3874
+ ///
3875
+ /// This method does not attempt to retrieve the password. If this credential's password is stored in the user's
3876
+ /// keychain, the `password` property may return `nil` even if this method returns `YES` -- getting the password may
3877
+ /// fail, or the user may refuse access.
3878
+ @property (readonly) BOOL hasPassword;
3879
+
3880
+ @end
3881
+
3882
+ /// This category defines the methods available to an `NSURLCredential` created to represent a client certificate credential.
3883
+ ///
3884
+ /// Client certificates are commonly stored on the user's computer in the keychain and must be presented to the server during a handshake.
3885
+ @interface NSURLCredential(NSClientCertificate)
3886
+
3887
+ /// Creates a URL credential instance for resolving a client certificate authentication challenge.
3888
+ ///
3889
+ /// - Parameter identity: A `SecIdentityRef` object.
3890
+ /// - Parameter certArray: An array containing at least one `SecCertificateRef` objects, or `nil` if the server
3891
+ /// does not need any intermediate certificates to authenticate the client.
3892
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3893
+ - (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));
3894
+
3895
+ /// Creates a new `NSURLCredential` with an identity and certificate array.
3896
+ ///
3897
+ /// - Parameter identity: A `SecIdentityRef` object.
3898
+ /// - Parameter certArray: An array containing at least one `SecCertificateRef` objects.
3899
+ /// - Parameter persistence: A value indicating whether the credential should be stored permanently, for the duration of the current session, or not at all.
3900
+ /// - Returns: The new autoreleased `NSURLCredential`.
3901
+ + (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));
3902
+
3903
+ /// The identity of this credential if it is a client certificate credential.
3904
+ ///
3905
+ /// This value is `nil` if the credential is not a client certificate credential.
3906
+ @property (nullable, readonly) SecIdentityRef identity;
3907
+
3908
+ /// The intermediate certificates of the credential, if it is a client certificate credential.
3909
+ ///
3910
+ /// The certificates are `SecCertificateRef` objects. This value is `nil` if this is not a client certificate credential.
3911
+ @property (readonly, copy) NSArray *certificates API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3912
+
3913
+ @end
3914
+
3915
+ @interface NSURLCredential(NSServerTrust)
3916
+
3917
+ /// Creates a URL credential instance for server trust authentication, initialized with an accepted trust.
3918
+ ///
3919
+ /// - Parameter trust: The accepted trust.
3920
+ - (instancetype)initWithTrust:(SecTrustRef)trust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3921
+
3922
+ /// Creates a URL credential instance for server trust authentication with a given accepted trust.
3923
+ ///
3924
+ /// 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.
3925
+ ///
3926
+ /// - Parameter trust: The accepted trust.
3927
+ /// - Returns: A new URL credential object, containing the accepted server trust.
3928
+ + (NSURLCredential *)credentialForTrust:(SecTrustRef)trust API_AVAILABLE(macos(10.6), ios(3.0), watchos(2.0), tvos(9.0));
3929
+
3930
+ @end
3931
+
3932
+ NS_HEADER_AUDIT_END(nullability, sendability)
3933
+
3934
+ /*
3935
+ NSURLAuthenticationChallenge.h
3936
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
3937
+
3938
+ Public header file.
3939
+ */
3940
+
3941
+
3942
+ @class NSURLAuthenticationChallenge;
3943
+ @class NSURLCredential;
3944
+ @class NSURLProtectionSpace;
3945
+ @class NSURLResponse;
3946
+ @class NSError;
3947
+
3948
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
3949
+
3950
+ /// The `URLAuthenticationChallengeSender` protocol represents the interface that the sender of an authentication challenge must implement.
3951
+ ///
3952
+ /// 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.
3953
+ ///
3954
+ /// > Important:
3955
+ /// > 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.
3956
+ NS_SWIFT_SENDABLE
3957
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3958
+ @protocol NSURLAuthenticationChallengeSender <NSObject>
3959
+
3960
+ /// Attempts to use a given credential for a given authentication challenge.
3961
+ ///
3962
+ /// This method has no effect if it is called with an authentication challenge that has already been handled.
3963
+ - (void)useCredential:(NSURLCredential *)credential forAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3964
+
3965
+ /// Attempts to continue downloading a request without providing a credential for a given challenge.
3966
+ ///
3967
+ /// This method has no effect if it is called with an authentication challenge that has already been handled.
3968
+ - (void)continueWithoutCredentialForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3969
+
3970
+ /// Cancels a given authentication challenge.
3971
+ - (void)cancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3972
+
3973
+ @optional
3974
+ /// Causes the system-provided default behavior to be used.
3975
+ - (void)performDefaultHandlingForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge;
3976
+
3977
+ /// Rejects the currently supplied protection space.
3978
+ - (void)rejectProtectionSpaceAndContinueWithChallenge:(NSURLAuthenticationChallenge *)challenge;
3979
+
3980
+ @end
3981
+
3982
+ @class NSURLAuthenticationChallengeInternal;
3983
+
3984
+ /// A challenge from a server requiring authentication from the client.
3985
+ ///
3986
+ /// 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.
3987
+ ///
3988
+ /// 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).
3989
+ NS_SWIFT_SENDABLE
3990
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
3991
+ @interface NSURLAuthenticationChallenge : NSObject <NSSecureCoding>
3992
+ {
3993
+ @private
3994
+ NSURLAuthenticationChallengeInternal *_internal;
3995
+ }
3996
+
3997
+ /// Initializes an authentication challenge.
3998
+ ///
3999
+ /// - Parameter space: The `NSURLProtectionSpace` to use.
4000
+ /// - Parameter credential: The proposed `NSURLCredential` for this challenge, or `nil`.
4001
+ /// - Parameter previousFailureCount: A count of previous failures attempting access.
4002
+ /// - Parameter response: The `NSURLResponse` for the authentication failure, if applicable, else `nil`.
4003
+ /// - Parameter error: The `NSError` for the authentication failure, if applicable, else `nil`.
4004
+ /// - Parameter sender: The sender of this challenge.
4005
+ /// - Returns: An authentication challenge initialized with the specified parameters.
4006
+ - (instancetype)initWithProtectionSpace:(NSURLProtectionSpace *)space proposedCredential:(nullable NSURLCredential *)credential previousFailureCount:(NSInteger)previousFailureCount failureResponse:(nullable NSURLResponse *)response error:(nullable NSError *)error sender:(id<NSURLAuthenticationChallengeSender>)sender;
4007
+
4008
+ /// Initializes an authentication challenge copying all parameters from another one.
4009
+ ///
4010
+ /// - Parameter challenge: The existing challenge to copy.
4011
+ /// - Parameter sender: The sender of the challenge.
4012
+ /// - Returns: A new challenge initialized with the parameters from the passed in challenge.
4013
+ ///
4014
+ /// This initializer may be useful to subclassers that want to proxy one type of authentication challenge to look like another type.
4015
+ - (instancetype)initWithAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge sender:(id<NSURLAuthenticationChallengeSender>)sender;
4016
+
4017
+ /// A description of the protection space that requires authentication.
4018
+ @property (readonly, copy) NSURLProtectionSpace *protectionSpace;
4019
+
4020
+ /// The proposed credential for this challenge.
4021
+ ///
4022
+ /// The proposed credential may be `nil`, if there is no default credential to use for this challenge (either stored
4023
+ /// or in the URL). If the credential is not `nil` and returns `YES` for `hasPassword`, it is ready to use as-is.
4024
+ /// If it returns `NO` for `hasPassword`, it provides a default username the client could use when prompting.
4025
+ @property (nullable, readonly, copy) NSURLCredential *proposedCredential;
4026
+
4027
+ /// The count of previous failed authentication attempts.
4028
+ @property (readonly) NSInteger previousFailureCount;
4029
+
4030
+ /// The response representing authentication failure.
4031
+ ///
4032
+ /// If there was a previous authentication failure, and this protocol uses responses to indicate authentication
4033
+ /// failure, then this method will return the response. Otherwise it will return `nil`.
4034
+ @property (nullable, readonly, copy) NSURLResponse *failureResponse;
4035
+
4036
+ /// The error representing authentication failure.
4037
+ ///
4038
+ /// If there was a previous authentication failure, and this protocol uses errors to indicate authentication
4039
+ /// failure, then this method will return the error. Otherwise it will return `nil`.
4040
+ @property (nullable, readonly, copy) NSError *error;
4041
+
4042
+ /// The sender of this challenge.
4043
+ ///
4044
+ /// The sender is the object you should reply to when done processing the challenge.
4045
+ @property (nullable, readonly, retain) id<NSURLAuthenticationChallengeSender> sender;
4046
+
4047
+ @end
4048
+
4049
+ NS_HEADER_AUDIT_END(nullability, sendability)
4050
+
4051
+ /*
4052
+ NSURLCredentialStorage.h
4053
+ Copyright (c) 2003-2019, Apple Inc. All rights reserved.
4054
+
4055
+ Public header file.
4056
+ */
4057
+
4058
+
4059
+ @class NSDictionary<KeyType, ObjectType>;
4060
+ @class NSString;
4061
+ @class NSURLCredential;
4062
+ @class NSURLSessionTask;
4063
+
4064
+ @class NSURLCredentialStorageInternal;
4065
+
4066
+ NS_HEADER_AUDIT_BEGIN(nullability, sendability)
4067
+
4068
+ /// The manager of a shared credentials cache.
4069
+ ///
4070
+ /// 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.
4071
+ ///
4072
+ /// ### Subclassing notes
4073
+ ///
4074
+ /// 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.
4075
+ ///
4076
+ /// 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:
4077
+ ///
4078
+ /// - Setting credentials — Override ``set(_:for:task:)`` instead of or in addition to ``set(_:for:)``.
4079
+ /// - Getting credentials — Override ``getCredentials(for:task:completionHandler:)`` instead of or in addition to ``credentials(for:)``.
4080
+ /// - Removing credentials — Override ``remove(_:for:options:task:)`` instead of or in addition to ``remove(_:for:options:)`` and ``remove(_:for:)``.
4081
+ /// - Setting default credentials — Override ``setDefaultCredential(_:for:task:)`` instead of or in addition to ``setDefaultCredential(_:for:)``.
4082
+ /// - Getting default credentials — Override ``getDefaultCredential(for:task:completionHandler:)`` instead of or in addition to ``defaultCredential(for:)``.
4083
+ NS_SWIFT_SENDABLE
4084
+ API_AVAILABLE(macos(10.2), ios(2.0), watchos(2.0), tvos(9.0))
4085
+ @interface NSURLCredentialStorage : NSObject
4086
+ {
4087
+ @private
4088
+ NSURLCredentialStorageInternal *_internal;
4089
+ }
4090
+
4091
+ /// The shared singleton authentication storage.
4092
+ @property (class, readonly, strong) NSURLCredentialStorage *sharedCredentialStorage;
4093
+
4094
+ /// Gets a dictionary mapping usernames to credentials for the specified protection space.
4095
+ ///
4096
+ /// - Parameter space: An `NSURLProtectionSpace` indicating the protection space for which to get credentials.
4097
+ /// - Returns: A dictionary where the keys are usernames and the values are the corresponding `NSURLCredential` instances.
4098
+ - (nullable NSDictionary<NSString *, NSURLCredential *> *)credentialsForProtectionSpace:(NSURLProtectionSpace *)space;
4099
+
4100
+ /// The credentials for all available protection spaces.
4101
+ ///
4102
+ /// The dictionary has keys corresponding to `NSURLProtectionSpace` instances. The values are dictionaries where the
4103
+ /// keys are user name strings, and each value is the corresponding `NSURLCredential` instance.
4104
+ @property (readonly, copy) NSDictionary<NSURLProtectionSpace *, NSDictionary<NSString *, NSURLCredential *> *> *allCredentials;
4105
+
4106
+ /// Adds a new credential to the set for the specified protection space or replaces an existing one.
4107
+ ///
4108
+ /// - Parameter credential: The credential to set.
4109
+ /// - Parameter space: The protection space for which to add it.
4110
+ ///
4111
+ /// Multiple credentials may be set for a given protection space, but each must have a distinct user. If a credential
4112
+ /// with the same user is already set for the protection space, the new one will replace it.
4113
+ - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4114
+
4115
+ /// Removes the credential from the set for the specified protection space.
4116
+ ///
4117
+ /// - Parameter credential: The credential to remove.
4118
+ /// - Parameter space: The protection space for which a credential should be removed.
4119
+ ///
4120
+ /// The credential is removed from both persistent and temporary storage. A credential that has a persistence
4121
+ /// policy of `NSURLCredentialPersistenceSynchronizable` will fail. See `removeCredential:forProtectionSpace:options:`.
4122
+ - (void)removeCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4123
+
4124
+ /// Removes the credential from the set for the specified protection space based on options.
4125
+ ///
4126
+ /// - Parameter credential: The credential to remove.
4127
+ /// - Parameter space: The protection space for which a credential should be removed.
4128
+ /// - Parameter options: A dictionary containing options to consider when removing the credential. This should be used
4129
+ /// when trying to delete a credential that has the `NSURLCredentialPersistenceSynchronizable` policy. When such
4130
+ /// credentials are removed, the credential will be removed on all devices that contain this credential.
4131
+ ///
4132
+ /// The credential is removed from both persistent and temporary storage.
4133
+ - (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));
4134
+
4135
+ /// Gets the default credential for the specified protection space.
4136
+ ///
4137
+ /// - Parameter space: The protection space for which to get the default credential.
4138
+ - (nullable NSURLCredential *)defaultCredentialForProtectionSpace:(NSURLProtectionSpace *)space;
4139
+
4140
+ /// Sets the default credential for the specified protection space.
4141
+ ///
4142
+ /// - Parameter credential: The credential to set as default.
4143
+ /// - Parameter space: The protection space for which the credential should be set as default.
4144
+ ///
4145
+ /// If the credential is not yet in the set for the protection space, it will be added to it.
4146
+ - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)space;
4147
+
4148
+ @end
4149
+
4150
+ @interface NSURLCredentialStorage (NSURLSessionTaskAdditions)
4151
+ /// Fetches credentials for the specified protection space and task, passing them to the completion handler.
4152
+ - (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:));
4153
+ /// Sets a credential for the specified protection space and task.
4154
+ - (void)setCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4155
+ /// Removes a credential for the specified protection space, options, and task.
4156
+ - (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));
4157
+ /// Fetches the default credential for the specified protection space and task, passing it to the completion handler.
4158
+ - (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));
4159
+ /// Sets the default credential for the specified protection space and task.
4160
+ - (void)setDefaultCredential:(NSURLCredential *)credential forProtectionSpace:(NSURLProtectionSpace *)protectionSpace task:(NSURLSessionTask *)task API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4161
+ @end
4162
+
4163
+ /// This notification is sent on the main thread whenever the set of stored credentials changes.
4164
+ 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));
4165
+
4166
+ /// 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.
4167
+ ///
4168
+ /// If the key is missing or the value is `@NO`, then no attempt will be made to remove such a credential.
4169
+ FOUNDATION_EXPORT NSString *const NSURLCredentialStorageRemoveSynchronizableCredentials API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
4170
+
4171
+ NS_HEADER_AUDIT_END(nullability, sendability)