peachsim 0.1.1728 → 0.1.1744

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 (374) hide show
  1. package/README.md +4 -0
  2. package/cli/app-catalog.ts +47 -23
  3. package/cli/app-fonts.ts +19 -1
  4. package/cli/command-registry.ts +3 -0
  5. package/cli/commands/control.ts +68 -16
  6. package/cli/commands/coverage-swift.ts +112 -4
  7. package/cli/commands/device.ts +3 -1
  8. package/cli/commands/doctor.ts +1 -4
  9. package/cli/commands/inspect/settling.ts +6 -1
  10. package/cli/commands/inspect/wait-ready.ts +22 -2
  11. package/cli/commands/package.ts +33 -21
  12. package/cli/commands/push.ts +56 -0
  13. package/cli/commands/serve.ts +9 -0
  14. package/cli/commands/shell-url.ts +41 -9
  15. package/cli/commands/swift.ts +1 -1
  16. package/cli/current-sim.ts +27 -0
  17. package/cli/drivers/linux-browser-libs.lock.json +323 -1
  18. package/cli/drivers/linux-browser-libs.ts +8 -6
  19. package/cli/drivers/playwright.ts +5 -1
  20. package/cli/internal-child.ts +11 -1
  21. package/cli/main.ts +6 -0
  22. package/cli/native-input.ts +1 -7
  23. package/cli/outbound-endpoints.ts +9 -1
  24. package/cli/packaged-app-launcher.ts +3 -1
  25. package/cli/scene-video.ts +28 -7
  26. package/cli/ws-bridge.ts +3 -1
  27. package/detox/index.ts +18 -5
  28. package/dist-lib/agent-daemon-client.cjs +1 -1
  29. package/dist-lib/agent-events.cjs +1 -1
  30. package/dist-lib/attached-projects.cjs +5 -2
  31. package/dist-lib/auth/shared-session.cjs +5 -2
  32. package/dist-lib/backend-origin.cjs +1 -1
  33. package/dist-lib/beta.cjs +1 -1
  34. package/dist-lib/beta.mjs +1 -1
  35. package/dist-lib/bridge-constants.cjs +1 -1
  36. package/dist-lib/bridge-contract-input.cjs +1 -1
  37. package/dist-lib/bridge-contract-input.mjs +1 -1
  38. package/dist-lib/bridge-contract.cjs +1 -1
  39. package/dist-lib/bridge-contract.mjs +1 -1
  40. package/dist-lib/bundle-channel.cjs +9932 -4561
  41. package/dist-lib/capture-contract.cjs +1 -1
  42. package/dist-lib/capture-contract.mjs +1 -1
  43. package/dist-lib/cloud-contract.cjs +1 -1
  44. package/dist-lib/cloud-contract.mjs +1 -1
  45. package/dist-lib/cloud-test-args.cjs +1 -1
  46. package/dist-lib/cloud-test-args.mjs +1 -1
  47. package/dist-lib/cloud.cjs +1 -1
  48. package/dist-lib/cloud.mjs +1 -1
  49. package/dist-lib/config.cjs +1 -1
  50. package/dist-lib/config.mjs +1 -1
  51. package/dist-lib/detox/index.cjs +30 -8
  52. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  53. package/dist-lib/expo-swift-bundle.cjs +6886 -3303
  54. package/dist-lib/expo-swift-metadata.cjs +14 -2
  55. package/dist-lib/expo-swift-metadata.mjs +14 -2
  56. package/dist-lib/home-paths.cjs +7 -2
  57. package/dist-lib/host/bridge-host.cjs +8513 -3085
  58. package/dist-lib/host/fetch-proxy-handler.cjs +19 -7
  59. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  60. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  61. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  62. package/dist-lib/host/websocket-proxy.cjs +6 -3
  63. package/dist-lib/index.cjs +175 -80
  64. package/dist-lib/jump-to-source-babel.cjs +1 -1
  65. package/dist-lib/jump-to-source-native.cjs +1 -1
  66. package/dist-lib/kotlin-host.cjs +209 -32
  67. package/dist-lib/menu.cjs +7 -1
  68. package/dist-lib/menu.mjs +7 -1
  69. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  70. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  71. package/dist-lib/metro-production-bundle.cjs +1 -1
  72. package/dist-lib/metro-production-bundle.mjs +1 -1
  73. package/dist-lib/metro.cjs +146 -76
  74. package/dist-lib/native-app-identity-project.cjs +76 -39
  75. package/dist-lib/native-app-identity-project.mjs +76 -39
  76. package/dist-lib/native-app-identity.cjs +10 -3
  77. package/dist-lib/native-app-identity.mjs +10 -3
  78. package/dist-lib/native-firebase-metadata.cjs +1 -1
  79. package/dist-lib/native-firebase-metadata.mjs +1 -1
  80. package/dist-lib/plist.cjs +1 -1
  81. package/dist-lib/plist.mjs +1 -1
  82. package/dist-lib/profiles.cjs +5 -2
  83. package/dist-lib/public-brand.cjs +1 -1
  84. package/dist-lib/public-origins-lib-esm.json +25 -23
  85. package/dist-lib/public-origins-lib.json +138 -80
  86. package/dist-lib/react-native-host-modules.cjs +5 -2
  87. package/dist-lib/react-native-host-modules.mjs +5 -2
  88. package/dist-lib/reap-browser.cjs +1 -1
  89. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  90. package/dist-lib/sdk.cjs +4 -1
  91. package/dist-lib/sdk.mjs +4 -1
  92. package/dist-lib/skills.cjs +41126 -36493
  93. package/dist-lib/swift-compile.cjs +2103 -444
  94. package/dist-lib/swift-compile.mjs +2025 -369
  95. package/dist-lib/swift-package.cjs +1 -1
  96. package/dist-lib/swift-package.mjs +1 -1
  97. package/dist-lib/swift-submit.cjs +2 -2
  98. package/dist-lib/swift-submit.mjs +2 -2
  99. package/dist-lib/swift-toolchain.cjs +84 -24
  100. package/dist-lib/swift.cjs +1 -1
  101. package/dist-lib/vite-swift.cjs +6094 -2687
  102. package/dist-lib/vite.cjs +32 -10
  103. package/dist-lib/worklet-executable.cjs +1 -1
  104. package/dist-lib/worklet-executable.mjs +1 -1
  105. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +1 -0
  106. package/dist-types/packages/peach-engine/src/cli-companion.d.ts +1 -0
  107. package/dist-types/packages/peach-engine/src/engine/canvaskit-renderer.d.ts +2 -0
  108. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
  109. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +1 -3
  110. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
  111. package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
  112. package/dist-types/packages/peach-engine/src/engine/node.d.ts +10 -1
  113. package/dist-types/packages/peach-engine/src/engine/paint-boundary.d.ts +1 -0
  114. package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +25 -3
  116. package/dist-types/packages/peach-engine/src/engine/scroll-platform.d.ts +1 -15
  117. package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +1 -3
  118. package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +6 -0
  119. package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
  120. package/dist-types/packages/peach-engine/src/engine/types.d.ts +23 -0
  121. package/dist-types/packages/peach-engine/src/ios/chrome-metrics.d.ts +6 -0
  122. package/dist-types/packages/peach-engine/src/metro-identity-contract.d.ts +33 -0
  123. package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
  124. package/dist-types/packages/peach-engine/src/preview/bundle-layout.d.ts +1 -1
  125. package/dist-types/packages/peach-engine/src/remote-stream/scene-recording.d.ts +2 -0
  126. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
  127. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +2 -0
  128. package/dist-types/packages/peach-engine/src/render-worker/metro-bundle-metadata.d.ts +28 -0
  129. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +21 -1
  130. package/dist-types/packages/peach-engine/src/render-worker/prepared-boot-bundle.d.ts +7 -0
  131. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +15 -2
  132. package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +1 -0
  133. package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +6 -0
  134. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +3 -3
  135. package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +1 -0
  136. package/dist-types/packages/peach-engine/src/render-worker/webgpu-readback-scheduler.d.ts +1 -1
  137. package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +14 -1
  138. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +8 -1
  139. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +1 -4
  140. package/dist-types/packages/peach-engine/src/rolldown-production-module.d.ts +12 -0
  141. package/dist-types/packages/peach-engine/src/rolldown-production-roles.d.ts +6 -0
  142. package/dist-types/packages/peach-engine/src/settings/devices.d.ts +6 -1
  143. package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +1 -0
  144. package/dist-types/packages/peach-engine/src/shell-events.d.ts +4 -0
  145. package/dist-types/packages/peach-kit/src/capabilities.d.ts +8 -0
  146. package/kotlin/README.md +3 -0
  147. package/kotlin/sdk.tar.gz +0 -0
  148. package/package.json +2 -1
  149. package/runtime-companion.json +1 -1
  150. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
  151. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
  152. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
  153. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
  154. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
  155. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
  156. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
  157. package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
  158. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
  159. package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetworkErrors.h +257 -0
  160. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFByteOrder.h +305 -0
  161. package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +2 -0
  162. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGAffineTransform.h +204 -0
  163. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBitmapContext.h +260 -0
  164. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColor.h +164 -0
  165. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorConversionInfo.h +101 -0
  166. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGColorSpace.h +510 -0
  167. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGContext.h +1132 -0
  168. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGConvertColorDataWithFormat.h +34 -0
  169. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataConsumer.h +83 -0
  170. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGDataProvider.h +197 -0
  171. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGEXRToneMappingGamma.h +36 -0
  172. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGError.h +38 -0
  173. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFont.h +312 -0
  174. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGFunction.h +106 -0
  175. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGradient.h +123 -0
  176. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGITUToneMapping.h +31 -0
  177. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h +409 -0
  178. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGLayer.h +78 -0
  179. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFArray.h +120 -0
  180. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContentStream.h +55 -0
  181. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFContext.h +535 -0
  182. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDictionary.h +133 -0
  183. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h +252 -0
  184. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFMarkedContentItem.h +37 -0
  185. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFObject.h +67 -0
  186. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFOperatorTable.h +51 -0
  187. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFPage.h +101 -0
  188. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFScanner.h +123 -0
  189. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStream.h +44 -0
  190. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFString.h +52 -0
  191. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFStructureElement.h +87 -0
  192. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPath.h +441 -0
  193. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPattern.h +89 -0
  194. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGRenderingBufferProvider.h +49 -0
  195. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGShading.h +124 -0
  196. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CGToneMapping.h +85 -0
  197. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +44 -252
  198. package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Modules/module.modulemap +1 -0
  199. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/CFNetworkErrors.h +257 -0
  200. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -9
  201. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +992 -98
  202. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/NSURLSession+Network.h +32 -0
  203. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/Network.h +51 -0
  204. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/advertise_descriptor.h +193 -0
  205. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_descriptor.h +163 -0
  206. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browse_result.h +207 -0
  207. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/browser.h +285 -0
  208. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection.h +714 -0
  209. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_group.h +629 -0
  210. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/connection_report.h +932 -0
  211. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/content_context.h +229 -0
  212. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/endpoint.h +390 -0
  213. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/error.h +135 -0
  214. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ethernet_channel.h +349 -0
  215. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/framer_options.h +1187 -0
  216. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/group_descriptor.h +184 -0
  217. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/interface.h +150 -0
  218. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ip_options.h +351 -0
  219. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/listener.h +438 -0
  220. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/nw_object.h +200 -0
  221. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/parameters.h +1205 -0
  222. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path.h +392 -0
  223. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/path_monitor.h +216 -0
  224. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/privacy_context.h +188 -0
  225. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/protocol_options.h +126 -0
  226. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/proxy_config.h +357 -0
  227. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/quic_options.h +889 -0
  228. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/resolver_config.h +94 -0
  229. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tcp_options.h +459 -0
  230. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/tls_options.h +115 -0
  231. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/txt_record.h +432 -0
  232. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/udp_options.h +112 -0
  233. package/sdk/ios/System/Library/Frameworks/Network.framework/Headers/ws_options.h +743 -0
  234. package/sdk/ios/System/Library/Frameworks/Network.framework/Modules/module.modulemap +9 -0
  235. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAAnimation.h +395 -0
  236. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h +132 -0
  237. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CADisplayLink.h +107 -0
  238. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterCell.h +153 -0
  239. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAEmitterLayer.h +151 -0
  240. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAFrameRateRange.h +40 -0
  241. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAGradientLayer.h +78 -0
  242. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h +1078 -0
  243. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h +97 -0
  244. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTimingFunction.h +67 -0
  245. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAReplicatorLayer.h +65 -0
  246. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAScrollLayer.h +64 -0
  247. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAShapeLayer.h +135 -0
  248. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATextLayer.h +99 -0
  249. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATiledLayer.h +67 -0
  250. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransaction.h +124 -0
  251. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransform3D.h +138 -0
  252. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CATransformLayer.h +40 -0
  253. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/CAValueFunction.h +78 -0
  254. package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +19 -38
  255. package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecureTransport.h +1757 -0
  256. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSAttributedString.h +19 -0
  257. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/NSParagraphStyle.h +28 -0
  258. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIAccessibilityConstants.h +114 -0
  259. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIApplication.h +16 -0
  260. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarAppearance.h +47 -0
  261. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDataDetectors.h +20 -0
  262. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDatePicker.h +13 -0
  263. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIDevice.h +16 -0
  264. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIEvent.h +84 -0
  265. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizer.h +119 -0
  266. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIGestureRecognizerSubclass.h +66 -0
  267. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIHoverGestureRecognizer.h +45 -0
  268. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.h +161 -37
  269. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIPickerView.h +76 -0
  270. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBar.h +8 -0
  271. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabBarAppearance.h +78 -0
  272. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITextInputTraits.h +29 -0
  273. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITouch.h +104 -0
  274. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITraitCollection.h +19 -0
  275. package/sdk/ios/usr/include/dns_sd.h +3616 -0
  276. package/sdk/ios/usr/include/dnssd.modulemap +4 -0
  277. package/sdk/ios/usr/include/module.modulemap +1 -0
  278. package/sdk/ios/usr/include/os/signpost.h +414 -0
  279. package/sdk/ios/usr/include/os.modulemap +5 -0
  280. package/sdk/ios/usr/include/sys/socketvar.h +191 -0
  281. package/sdk/ios/usr/include/sys/vsock.h +84 -0
  282. package/sdk/ios/wasm/include/errno.h +4 -20
  283. package/sdk/ios/wasm/include/pthread.h +3 -0
  284. package/sdk/ios/wasm/include/setjmp.h +57 -0
  285. package/sdk/ios/wasm/include/sys/resource.h +2 -2
  286. package/sdk/native-hashes.json +3 -3
  287. package/skills/contrast/SKILL.md +6 -5
  288. package/skills/peach-debug/SKILL.md +68 -265
  289. package/skills/peach-debug/references/accessibility.md +37 -73
  290. package/skills/peach-debug/references/commands.md +2 -2
  291. package/skills/peach-debug/references/events.md +74 -0
  292. package/skills/peach-perf/SKILL.md +64 -402
  293. package/skills/peach-perf/references/presentation.md +46 -0
  294. package/skills/peach-perf/references/profiling.md +93 -0
  295. package/skills/peach-perf/references/render-counters.md +57 -0
  296. package/skills/peach-setup/SKILL.md +66 -217
  297. package/skills/peach-setup/references/native-config.md +35 -0
  298. package/skills/peach-setup/references/reporting.md +28 -0
  299. package/skills/peach-test/SKILL.md +68 -285
  300. package/skills/peach-test/references/detox.md +69 -0
  301. package/skills/peach-test/references/maestro.md +95 -0
  302. package/skills/peach-visual/SKILL.md +53 -106
  303. package/src/android-autolinking.ts +1 -0
  304. package/src/android-bridge-packages.ts +279 -0
  305. package/src/appPackageContract.ts +14 -1
  306. package/src/assetCatalogContract.ts +8 -1
  307. package/src/bridge-contract.ts +6 -0
  308. package/src/bundle-channel.mjs +152 -60
  309. package/src/cli-runtime.ts +3 -0
  310. package/src/configured-bundle-producer.ts +10 -0
  311. package/src/device-catalog.ts +68 -4
  312. package/src/expo-discovery-cache.ts +10 -3
  313. package/src/expo-kotlin-host.ts +97 -26
  314. package/src/expo-native-workspace.ts +211 -52
  315. package/src/expo-swift-host.ts +149 -123
  316. package/src/expo-swift-ready.ts +5 -1
  317. package/src/expo-widget-assets.ts +76 -0
  318. package/src/expoKotlinContract.ts +12 -2
  319. package/src/expoSwiftContract.ts +21 -2
  320. package/src/generated/swift-c-predefines.json +1 -1
  321. package/src/home-paths.ts +6 -1
  322. package/src/host/bridge-host.ts +5 -0
  323. package/src/host/fetch-proxy-handler.ts +10 -0
  324. package/src/host/websocket-proxy.ts +7 -2
  325. package/src/kotlin-host.ts +204 -30
  326. package/src/kotlinSdkContract.ts +2 -1
  327. package/src/menu.ts +7 -0
  328. package/src/native-prebuilt.ts +154 -0
  329. package/src/nitro-adapter.lock.json +261 -261
  330. package/src/nitro-adapter.ts +118 -50
  331. package/src/nitro-bundle.ts +134 -96
  332. package/src/nitro-compile.ts +16 -6
  333. package/src/nitro-dependencies.ts +43 -28
  334. package/src/nitro-source.ts +142 -30
  335. package/src/nitro-superset.lock.json +103 -0
  336. package/src/nitro-superset.ts +137 -0
  337. package/src/nitroAdapterContract.ts +146 -98
  338. package/src/nitroContract.ts +68 -21
  339. package/src/react-bridge-importers.ts +1 -0
  340. package/src/react-native-bridge-modules.ts +2 -0
  341. package/src/react-native-host-modules.ts +4 -1
  342. package/src/settingsContract.ts +37 -1
  343. package/src/storageSnapshotContract.ts +29 -81
  344. package/src/swift-compile.ts +315 -117
  345. package/src/swift-compiler-digest.ts +2 -0
  346. package/src/swift-coverage/indexdump.ts +22 -6
  347. package/src/swift-coverage/indexing.ts +4 -4
  348. package/src/swift-coverage/sdk.ts +104 -20
  349. package/src/swift-coverage/types.ts +34 -0
  350. package/src/swift-coverage/xcode-packages.ts +61 -1
  351. package/src/swift-coverage/xcode.ts +19 -13
  352. package/src/swift-cxx-reachable.ts +1 -1
  353. package/src/swift-distribution.lock.json +18 -13
  354. package/src/swift-distribution.ts +57 -26
  355. package/src/swift-host.ts +51 -35
  356. package/src/swift-link-roots.ts +45 -18
  357. package/src/swift-objc-compile.ts +78 -2
  358. package/src/swift-objc-standin.ts +3 -0
  359. package/src/swift-shared-sdk.ts +85 -1
  360. package/src/swift-standin-emit.ts +6 -1
  361. package/src/swift-standins.ts +403 -19
  362. package/src/swift-submit.ts +17 -1
  363. package/src/swift-toolchain.ts +98 -23
  364. package/src/swift-wasm-prune.ts +1629 -0
  365. package/src/turbo-bundle.ts +82 -0
  366. package/src/turbo-compile.ts +120 -0
  367. package/src/turbo-runtime.lock.json +69 -0
  368. package/src/turbo-source.ts +754 -0
  369. package/src/vite-plugin-one.ts +15 -3
  370. package/src/vite-plugin.ts +82 -23
  371. package/src/wasm-optimize.ts +34 -0
  372. package/src/worker-system-chunks.ts +3 -3
  373. package/src/xcode-project.ts +52 -0
  374. package/src/xcode-target-members.ts +12 -1
@@ -17,7 +17,11 @@
17
17
  #include <objc/encoding.h>
18
18
  #import <dispatch/dispatch.h>
19
19
  #import <CoreFoundation/CoreFoundation.h>
20
- @class NSCharacterSet;
20
+ // native NSGeometry.h imports CGGeometry.h, which carries the inline CGPointMake family. swift defines those itself in its CoreGraphics module
21
+ #ifndef __swift__
22
+ #import <CoreGraphics/CGGeometry.h>
23
+ #endif
24
+ @class NSCharacterSet, NSPredicate;
21
25
  @class NSURLSessionConfiguration, NSOperation, NSURLCache, NSCachedURLResponse, NSBlockOperation, NSCache;
22
26
  #import <Security/Security.h>
23
27
 
@@ -235,7 +239,7 @@ typedef NS_OPTIONS(NSUInteger, NSEnumerationOptions) { NSEnumerationConcurrent =
235
239
  typedef NS_OPTIONS(NSUInteger, NSSortOptions) { NSSortConcurrent = (1UL << 0), NSSortStable = (1UL << 4) };
236
240
  typedef NS_ENUM(NSInteger, NSQualityOfService) { NSQualityOfServiceUserInteractive = 0x21, NSQualityOfServiceUserInitiated = 0x19, NSQualityOfServiceUtility = 0x11, NSQualityOfServiceBackground = 0x09, NSQualityOfServiceDefault = -1 } NS_SWIFT_NAME(QualityOfService);
237
241
 
238
- @class NSIndexSet, NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>, NSEnumerator<ObjectType>, NSLocale, NSOperationQueue, NSCharacterSet;
242
+ @class NSIndexSet, NSArray<ObjectType>, NSDictionary<KeyType, ObjectType>, NSError, NSURL, NSData, NSCoder, NSSet<ObjectType>, NSEnumerator<ObjectType>, NSLocale, NSOperationQueue, NSCharacterSet, NSURLQueryItem;
239
243
 
240
244
  @protocol NSCoding
241
245
  - (void)encodeWithCoder:(NSCoder *)coder;
@@ -688,6 +692,9 @@ FOUNDATION_EXPORT NSStringEncodingDetectionOptionsKey const NSStringEncodingDete
688
692
  @property (readonly, copy) NSString *pathExtension;
689
693
  @property (readonly, copy) NSString *stringByDeletingLastPathComponent;
690
694
  @property (readonly, copy) NSString *lastPathComponent;
695
+ @property (readonly, copy) NSArray<NSString *> *pathComponents;
696
+ @property (readonly, getter=isAbsolutePath) BOOL absolutePath;
697
+ @property (readonly, copy) NSString *stringByExpandingTildeInPath;
691
698
  @end
692
699
 
693
700
  @interface NSString (NSURLUtilities)
@@ -787,6 +794,9 @@ __attribute__((swift_bridge("Swift.Array")))
787
794
  - (NSArray<ObjectType> *)arrayByAddingObject:(ObjectType)anObject;
788
795
  - (NSArray<ObjectType> *)arrayByAddingObjectsFromArray:(NSArray<ObjectType> *)otherArray;
789
796
  - (NSString *)componentsJoinedByString:(NSString *)separator;
797
+ #ifndef __swift__
798
+ - (NSArray<ObjectType> *)filteredArrayUsingPredicate:(NSPredicate *)predicate;
799
+ #endif
790
800
  - (BOOL)containsObject:(ObjectType)anObject;
791
801
  @property (readonly, copy) NSString *description;
792
802
  - (NSString *)descriptionWithLocale:(nullable id)locale;
@@ -1107,6 +1117,12 @@ __attribute__((swift_bridge("Swift.Set")))
1107
1117
  @property (nullable, readonly) void *pointerValue;
1108
1118
  - (BOOL)isEqualToValue:(NSValue *)value;
1109
1119
  @end
1120
+ #ifndef __swift__
1121
+ @interface NSValue (NSValueRangeExtensions)
1122
+ + (NSValue *)valueWithRange:(NSRange)range;
1123
+ @property (readonly) NSRange rangeValue;
1124
+ @end
1125
+ #endif
1110
1126
  NS_SWIFT_SENDABLE
1111
1127
  @interface NSNumber : NSValue
1112
1128
  - (nullable instancetype)initWithCoder:(NSCoder *)coder NS_DESIGNATED_INITIALIZER;
@@ -1569,10 +1585,18 @@ __attribute__((swift_bridge("URLComponents")))
1569
1585
  @interface NSURLComponents : NSObject <NSCopying>
1570
1586
  + (nullable instancetype)componentsWithURL:(NSURL *)url resolvingAgainstBaseURL:(BOOL)resolve;
1571
1587
  @property (nullable, readonly, copy) NSURL *URL;
1588
+ @property (nullable, copy) NSString *scheme;
1572
1589
  @property (nullable, copy) NSString *path;
1590
+ @property (nullable, copy) NSString *percentEncodedPath;
1591
+ @property (nullable, copy) NSString *percentEncodedQuery;
1592
+ @property (nullable, copy) NSArray<NSURLQueryItem *> *queryItems API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
1573
1593
  @end
1574
1594
  __attribute__((swift_bridge("URLQueryItem")))
1575
1595
  @interface NSURLQueryItem : NSObject <NSCopying, NSSecureCoding>
1596
+ - (instancetype)initWithName:(NSString *)name value:(nullable NSString *)value API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
1597
+ + (instancetype)queryItemWithName:(NSString *)name value:(nullable NSString *)value API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
1598
+ @property (readonly, copy) NSString *name;
1599
+ @property (nullable, readonly, copy) NSString *value;
1576
1600
  @end
1577
1601
  typedef NS_ENUM(NSUInteger, NSURLRequestCachePolicy)
1578
1602
  {
@@ -1610,6 +1634,7 @@ __attribute__((swift_bridge("URLRequest")))
1610
1634
  @property (nullable, copy) NSData *HTTPBody;
1611
1635
  @end
1612
1636
  NS_SWIFT_NAME(URLResponse)
1637
+ NS_SWIFT_SENDABLE
1613
1638
  @interface NSURLResponse : NSObject <NSCopying, NSSecureCoding>
1614
1639
  - (instancetype)initWithURL:(NSURL *)URL MIMEType:(nullable NSString *)MIMEType expectedContentLength:(NSInteger)length textEncodingName:(nullable NSString *)name;
1615
1640
  @property (nullable, readonly, copy) NSString *textEncodingName;
@@ -1619,6 +1644,7 @@ NS_SWIFT_NAME(URLResponse)
1619
1644
  @property (nullable, readonly, copy) NSURL *URL;
1620
1645
  @end
1621
1646
  NS_SWIFT_NAME(HTTPURLResponse)
1647
+ NS_SWIFT_SENDABLE
1622
1648
  @interface NSHTTPURLResponse : NSURLResponse
1623
1649
  + (NSString *)localizedStringForStatusCode:(NSInteger)statusCode;
1624
1650
  - (nullable NSString *)valueForHTTPHeaderField:(NSString *)field;
@@ -1702,10 +1728,20 @@ __attribute__((availability(macos,introduced=10.2), availability(ios,introduced=
1702
1728
  - (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
1729
  - (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
1730
  @end
1705
- NS_SWIFT_NAME(URLSessionDelegate)
1706
- @protocol NSURLSessionDelegate <NSObject>
1707
- @end
1708
- NS_SWIFT_NAME(URLSessionTaskDelegate)
1731
+ @class NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, NSURLCredential, NSInputStream, NSOutputStream, NSURLSessionTaskMetrics, NSHTTPURLResponse, NSURLSessionDataTask, NSURLSessionDownloadTask, NSURLSessionStreamTask, NSCachedURLResponse, NSURLSessionUploadTask, NSURLSessionWebSocketTask, NSURLSessionConfiguration, NSURLSessionTaskTransactionMetrics, NSProgress, NSURLCredentialStorage;
1732
+ typedef NS_ENUM(NSInteger, NSURLSessionWebSocketCloseCode);
1733
+ typedef NS_ENUM(NSUInteger, NSURLRequestNetworkServiceType)
1734
+ {
1735
+ NSURLNetworkServiceTypeDefault = 0,
1736
+ NSURLNetworkServiceTypeVoIP API_DEPRECATED("Use PushKit for VoIP control purposes", macos(10.7,10.15), ios(4.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0)) = 1,
1737
+ NSURLNetworkServiceTypeVideo = 2,
1738
+ NSURLNetworkServiceTypeBackground = 3,
1739
+ NSURLNetworkServiceTypeVoice = 4,
1740
+ NSURLNetworkServiceTypeResponsiveData = 6,
1741
+ NSURLNetworkServiceTypeAVStreaming API_AVAILABLE(macosx(10.9), ios(7.0), watchos(2.0), tvos(9.0)) = 8 ,
1742
+ NSURLNetworkServiceTypeResponsiveAV API_AVAILABLE(macosx(10.9), ios(7.0), watchos(2.0), tvos(9.0)) = 9,
1743
+ NSURLNetworkServiceTypeCallSignaling API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0)) = 11,
1744
+ };
1709
1745
  typedef NS_ENUM(NSInteger, NSURLSessionAuthChallengeDisposition) {
1710
1746
  NSURLSessionAuthChallengeUseCredential = 0,
1711
1747
  NSURLSessionAuthChallengePerformDefaultHandling = 1,
@@ -1722,8 +1758,17 @@ typedef NS_ENUM(NSInteger, NSURLSessionDelayedRequestDisposition) {
1722
1758
  NSURLSessionDelayedRequestContinueLoading = 0,
1723
1759
  NSURLSessionDelayedRequestUseNewRequest = 1,
1724
1760
  NSURLSessionDelayedRequestCancel = 2,
1725
- } __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
1726
- @class NSURLSession, NSURLSessionTask, NSURLAuthenticationChallenge, NSURLCredential, NSInputStream, NSURLSessionTaskMetrics, NSHTTPURLResponse, NSURLSessionDataTask, NSURLSessionDownloadTask, NSURLSessionStreamTask, NSCachedURLResponse;
1761
+ } NS_SWIFT_NAME(URLSession.DelayedRequestDisposition) __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
1762
+ NS_SWIFT_NAME(URLSessionDelegate)
1763
+ NS_SWIFT_SENDABLE
1764
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
1765
+ @protocol NSURLSessionDelegate <NSObject>
1766
+ @optional
1767
+ - (void)URLSession:(NSURLSession *)session didBecomeInvalidWithError:(nullable NSError *)error;
1768
+ - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge
1769
+ completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURLSessionAuthChallengeDisposition disposition, NSURLCredential * _Nullable credential))completionHandler;
1770
+ - (void)URLSessionDidFinishEventsForBackgroundURLSession:(NSURLSession *)session API_AVAILABLE(macos(11.0), ios(7.0), watchos(2.0), tvos(9.0));
1771
+ @end
1727
1772
  @protocol NSURLSessionTaskDelegate <NSURLSessionDelegate>
1728
1773
  @optional
1729
1774
  - (void)URLSession:(NSURLSession *)session didCreateTask:(NSURLSessionTask *)task
@@ -1745,7 +1790,7 @@ typedef NS_ENUM(NSInteger, NSURLSessionDelayedRequestDisposition) {
1745
1790
  needNewBodyStream:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler NS_SWIFT_ASYNC_NAME(urlSession(_:needNewBodyStreamForTask:));
1746
1791
  - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
1747
1792
  needNewBodyStreamFromOffset:(int64_t)offset
1748
- completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler NS_SWIFT_ASYNC_NAME(urlSession(_:needNewBodyStreamForTask:from:)) __attribute__((availability(macos,introduced=14.0), availability(ios,introduced=17.0), availability(watchos,introduced=10.0), availability(tvos,introduced=17.0)));
1793
+ completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSInputStream * _Nullable bodyStream))completionHandler NS_SWIFT_NAME(urlSession(_:task:needNewBodyStreamFrom:completionHandler:)) NS_SWIFT_ASYNC_NAME(urlSession(_:needNewBodyStreamForTask:from:)) __attribute__((availability(macos,introduced=14.0), availability(ios,introduced=17.0), availability(watchos,introduced=10.0), availability(tvos,introduced=17.0)));
1749
1794
  - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task
1750
1795
  didSendBodyData:(int64_t)bytesSent
1751
1796
  totalBytesSent:(int64_t)totalBytesSent
@@ -1772,42 +1817,488 @@ NS_SWIFT_NAME(URLSessionDataDelegate)
1772
1817
  willCacheResponse:(NSCachedURLResponse *)proposedResponse
1773
1818
  completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSCachedURLResponse * _Nullable cachedResponse))completionHandler;
1774
1819
  @end
1820
+ @protocol NSURLSessionDownloadDelegate <NSURLSessionTaskDelegate>
1821
+ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
1822
+ didFinishDownloadingToURL:(NSURL *)location;
1823
+ @optional
1824
+ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
1825
+ didWriteData:(int64_t)bytesWritten
1826
+ totalBytesWritten:(int64_t)totalBytesWritten
1827
+ totalBytesExpectedToWrite:(int64_t)totalBytesExpectedToWrite;
1828
+ - (void)URLSession:(NSURLSession *)session downloadTask:(NSURLSessionDownloadTask *)downloadTask
1829
+ didResumeAtOffset:(int64_t)fileOffset
1830
+ expectedTotalBytes:(int64_t)expectedTotalBytes;
1831
+ @end
1832
+ @protocol NSURLSessionStreamDelegate <NSURLSessionTaskDelegate>
1833
+ @optional
1834
+ - (void)URLSession:(NSURLSession *)session readClosedForStreamTask:(NSURLSessionStreamTask *)streamTask;
1835
+ - (void)URLSession:(NSURLSession *)session writeClosedForStreamTask:(NSURLSessionStreamTask *)streamTask;
1836
+ - (void)URLSession:(NSURLSession *)session betterRouteDiscoveredForStreamTask:(NSURLSessionStreamTask *)streamTask;
1837
+ - (void)URLSession:(NSURLSession *)session streamTask:(NSURLSessionStreamTask *)streamTask
1838
+ didBecomeInputStream:(NSInputStream *)inputStream
1839
+ outputStream:(NSOutputStream *)outputStream;
1840
+ @end
1841
+ @protocol NSURLSessionWebSocketDelegate <NSURLSessionTaskDelegate>
1842
+ @optional
1843
+ - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didOpenWithProtocol:(nullable NSString *)protocol;
1844
+ - (void)URLSession:(NSURLSession *)session webSocketTask:(NSURLSessionWebSocketTask *)webSocketTask didCloseWithCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason;
1845
+ @end
1775
1846
  @class NSURLSessionDataTask;
1847
+ @class NSNetService;
1776
1848
  NS_SWIFT_NAME(URLSession)
1777
1849
  NS_SWIFT_SENDABLE
1778
- __attribute__((availability(ios,introduced=7.0)))
1850
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
1779
1851
  @interface NSURLSession : NSObject
1780
- - (void)invalidateAndCancel;
1852
+
1853
+ @property (class, readonly, strong) NSURLSession *sharedSession;
1854
+
1855
+ + (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration;
1856
+
1857
+ + (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(nullable id <NSURLSessionDelegate>)delegate delegateQueue:(nullable NSOperationQueue *)queue;
1858
+
1859
+ @property (readonly, retain) NSOperationQueue *delegateQueue;
1860
+
1781
1861
  @property (nullable, readonly, retain) id <NSURLSessionDelegate> delegate;
1862
+
1863
+ @property (readonly, copy) NSURLSessionConfiguration *configuration;
1864
+
1865
+ @property (nullable, copy) NSString *sessionDescription;
1866
+
1782
1867
  - (void)finishTasksAndInvalidate;
1868
+
1869
+ - (void)invalidateAndCancel;
1870
+
1871
+ - (void)resetWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(void))completionHandler;
1872
+
1873
+ - (void)flushWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(void))completionHandler;
1874
+
1875
+ - (void)getTasksWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSArray<NSURLSessionDataTask *> *dataTasks, NSArray<NSURLSessionUploadTask *> *uploadTasks, NSArray<NSURLSessionDownloadTask *> *downloadTasks))completionHandler NS_SWIFT_ASYNC_NAME(getter:tasks());
1876
+
1877
+ - (void)getAllTasksWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSArray<__kindof NSURLSessionTask *> *tasks))completionHandler NS_SWIFT_ASYNC_NAME(getter:allTasks()) API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1878
+
1879
+
1783
1880
  - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request;
1784
- @property (readonly, copy) NSURLSessionConfiguration *configuration;
1785
- + (NSURLSession *)sessionWithConfiguration:(NSURLSessionConfiguration *)configuration delegate:(nullable id <NSURLSessionDelegate>)delegate delegateQueue:(nullable NSOperationQueue *)queue;
1786
- @property (class, readonly, strong) NSURLSession * _Nonnull sharedSession;
1787
- - (NSURLSessionDataTask * _Nonnull)dataTaskWithRequest:(NSURLRequest * _Nonnull)request completionHandler:(void (NS_SWIFT_SENDABLE ^ _Nonnull)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1881
+
1882
+ - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url;
1883
+
1884
+ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL;
1885
+
1886
+ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(NSData *)bodyData;
1887
+
1888
+ - (NSURLSessionUploadTask *)uploadTaskWithResumeData:(NSData *)resumeData API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1889
+
1890
+ - (NSURLSessionUploadTask *)uploadTaskWithStreamedRequest:(NSURLRequest *)request;
1891
+
1892
+ - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request;
1893
+
1894
+ - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url;
1895
+
1896
+ - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData;
1897
+
1898
+ - (NSURLSessionStreamTask *)streamTaskWithHostName:(NSString *)hostname port:(NSInteger)port API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0));
1899
+
1900
+ - (NSURLSessionStreamTask *)streamTaskWithNetService:(NSNetService *)service API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.11, API_TO_BE_DEPRECATED), ios(9.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(watchos);
1901
+
1902
+ - (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1903
+
1904
+ - (NSURLSessionWebSocketTask *)webSocketTaskWithURL:(NSURL *)url protocols:(NSArray<NSString *>*)protocols API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1905
+
1906
+ - (NSURLSessionWebSocketTask *)webSocketTaskWithRequest:(NSURLRequest *)request API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1907
+
1908
+
1909
+ - (instancetype)init API_DEPRECATED("Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1910
+ + (instancetype)new API_DEPRECATED("Please use +[NSURLSession sessionWithConfiguration:] or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1911
+
1788
1912
  @end
1913
+ @interface NSURLSession (NSURLSessionAsynchronousConvenience)
1914
+ - (NSURLSessionDataTask *)dataTaskWithRequest:(NSURLRequest *)request completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1915
+
1916
+ - (NSURLSessionDataTask *)dataTaskWithURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1917
+
1918
+ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromFile:(NSURL *)fileURL completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1919
+
1920
+ - (NSURLSessionUploadTask *)uploadTaskWithRequest:(NSURLRequest *)request fromData:(nullable NSData *)bodyData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1921
+
1922
+ - (NSURLSessionUploadTask *)uploadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
1923
+
1924
+ - (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1925
+
1926
+ - (NSURLSessionDownloadTask *)downloadTaskWithURL:(NSURL *)url completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1927
+
1928
+ - (NSURLSessionDownloadTask *)downloadTaskWithResumeData:(NSData *)resumeData completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error))completionHandler;
1929
+
1930
+ @end
1931
+ @protocol NSProgressReporting <NSObject>
1932
+ @property (readonly, strong) NSProgress *progress;
1933
+ @end
1934
+ typedef NS_ENUM(NSInteger, NSURLSessionTaskState) {
1935
+ NSURLSessionTaskStateRunning = 0,
1936
+ NSURLSessionTaskStateSuspended = 1,
1937
+ NSURLSessionTaskStateCanceling = 2,
1938
+ NSURLSessionTaskStateCompleted = 3,
1939
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
1789
1940
  NS_SWIFT_NAME(URLSessionTask)
1790
1941
  NS_SWIFT_SENDABLE
1791
- __attribute__((availability(ios,introduced=7.0)))
1792
- @interface NSURLSessionTask : NSObject <NSCopying>
1793
- @property (readonly) NSUInteger taskIdentifier;
1942
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
1943
+ @interface NSURLSessionTask : NSObject <NSCopying, NSProgressReporting>
1944
+
1945
+ @property (readonly) NSInteger taskIdentifier;
1946
+
1947
+ @property (nullable, readonly, copy) NSURLRequest *originalRequest;
1948
+
1949
+ @property (nullable, readonly, copy) NSURLRequest *currentRequest;
1950
+
1951
+ @property (nullable, readonly, copy) NSURLResponse *response;
1952
+
1953
+ @property (nullable, retain) id <NSURLSessionTaskDelegate> delegate API_AVAILABLE(macos(12.0), ios(15.0), watchos(8.0), tvos(15.0));
1954
+
1955
+ @property (readonly, strong) NSProgress *progress API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
1956
+
1957
+ @property (nullable, copy) NSDate *earliestBeginDate API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
1958
+
1959
+ @property int64_t countOfBytesClientExpectsToSend API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
1960
+
1961
+ @property int64_t countOfBytesClientExpectsToReceive API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
1962
+
1963
+
1964
+ @property (readonly) int64_t countOfBytesSent;
1965
+
1966
+ @property (readonly) int64_t countOfBytesReceived;
1967
+
1968
+ @property (readonly) int64_t countOfBytesExpectedToSend;
1969
+
1970
+ @property (readonly) int64_t countOfBytesExpectedToReceive;
1971
+
1972
+ @property (nullable, copy) NSString *taskDescription;
1973
+
1794
1974
  - (void)cancel;
1795
- @property float priority __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
1975
+
1976
+ @property (readonly) NSURLSessionTaskState state;
1977
+
1978
+ @property (nullable, readonly, copy) NSError *error;
1979
+
1980
+ - (void)suspend;
1981
+
1796
1982
  - (void)resume;
1797
- @end
1798
- NS_SWIFT_NAME(URLSessionTaskMetrics)
1799
- @interface NSURLSessionTaskMetrics : NSObject
1983
+
1984
+ @property float priority API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
1985
+
1986
+ @property BOOL prefersIncrementalDelivery API_AVAILABLE(macos(11.3), ios(14.5), watchos(7.4), tvos(14.5));
1987
+
1988
+
1989
+ - (instancetype)init API_DEPRECATED("Not supported", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1990
+ + (instancetype)new API_DEPRECATED("Not supported", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1991
+
1800
1992
  @end
1801
1993
  NS_SWIFT_NAME(URLSessionDataTask)
1802
1994
  NS_SWIFT_SENDABLE
1803
- __attribute__((availability(ios,introduced=7.0)))
1995
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
1804
1996
  @interface NSURLSessionDataTask : NSURLSessionTask
1997
+
1998
+ - (instancetype)init API_DEPRECATED("Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
1999
+ + (instancetype)new API_DEPRECATED("Please use -[NSURLSession dataTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2000
+
2001
+ @end
2002
+ NS_SWIFT_SENDABLE
2003
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
2004
+ @interface NSURLSessionUploadTask : NSURLSessionDataTask
2005
+
2006
+ - (instancetype)init API_DEPRECATED("Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2007
+ + (instancetype)new API_DEPRECATED("Please use -[NSURLSession uploadTaskWithStreamedRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2008
+
2009
+ - (void)cancelByProducingResumeData:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable resumeData))completionHandler API_AVAILABLE(macos(14.0), ios(17.0), watchos(10.0), tvos(17.0));
2010
+
2011
+ @end
2012
+ NS_SWIFT_SENDABLE
2013
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
2014
+ @interface NSURLSessionDownloadTask : NSURLSessionTask
2015
+
2016
+ - (void)cancelByProducingResumeData:(void (NS_SWIFT_SENDABLE ^)(NSData * _Nullable resumeData))completionHandler;
2017
+
2018
+
2019
+ - (instancetype)init API_DEPRECATED("Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2020
+ + (instancetype)new API_DEPRECATED("Please use -[NSURLSession downloadTaskWithRequest:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2021
+
2022
+ @end
2023
+ NS_SWIFT_SENDABLE
2024
+ API_AVAILABLE(macos(10.11), ios(9.0), watchos(2.0), tvos(9.0))
2025
+ @interface NSURLSessionStreamTask : NSURLSessionTask
2026
+
2027
+ - (void)readDataOfMinLength:(NSInteger)minBytes maxLength:(NSInteger)maxBytes timeout:(NSTimeInterval)timeout completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSData * _Nullable_result data, BOOL atEOF, NSError * _Nullable error))completionHandler;
2028
+
2029
+ - (void)writeData:(NSData *)data timeout:(NSTimeInterval)timeout completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSError * _Nullable error))completionHandler;
2030
+
2031
+ - (void)captureStreams;
2032
+
2033
+ - (void)closeWrite;
2034
+
2035
+ - (void)closeRead;
2036
+
2037
+ - (void)startSecureConnection;
2038
+
2039
+ - (void)stopSecureConnection API_DEPRECATED("TLS cannot be disabled once it is enabled", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2040
+
2041
+
2042
+ - (instancetype)init API_DEPRECATED("Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2043
+ + (instancetype)new API_DEPRECATED("Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2044
+
2045
+ @end
2046
+ typedef NS_ENUM(NSInteger, NSURLSessionWebSocketMessageType) {
2047
+ NSURLSessionWebSocketMessageTypeData = 0,
2048
+ NSURLSessionWebSocketMessageTypeString = 1,
2049
+ } API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2050
+ NS_SWIFT_SENDABLE
2051
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
2052
+ @interface NSURLSessionWebSocketMessage : NSObject
2053
+
2054
+ - (instancetype)initWithData:(NSData *)data NS_DESIGNATED_INITIALIZER;
2055
+
2056
+ - (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER;
2057
+
2058
+ @property (readonly) NSURLSessionWebSocketMessageType type;
2059
+ @property (nullable, readonly, copy) NSData *data;
2060
+ @property (nullable, readonly, copy) NSString *string;
2061
+
2062
+
2063
+ - (instancetype)init NS_UNAVAILABLE;
2064
+ + (instancetype)new NS_UNAVAILABLE;
2065
+
2066
+ @end
2067
+ typedef NS_ENUM(NSInteger, NSURLSessionWebSocketCloseCode)
2068
+ {
2069
+ NSURLSessionWebSocketCloseCodeInvalid = 0,
2070
+ NSURLSessionWebSocketCloseCodeNormalClosure = 1000,
2071
+ NSURLSessionWebSocketCloseCodeGoingAway = 1001,
2072
+ NSURLSessionWebSocketCloseCodeProtocolError = 1002,
2073
+ NSURLSessionWebSocketCloseCodeUnsupportedData = 1003,
2074
+ NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005,
2075
+ NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006,
2076
+ NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007,
2077
+ NSURLSessionWebSocketCloseCodePolicyViolation = 1008,
2078
+ NSURLSessionWebSocketCloseCodeMessageTooBig = 1009,
2079
+ NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = 1010,
2080
+ NSURLSessionWebSocketCloseCodeInternalServerError = 1011,
2081
+ NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015,
2082
+ } API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2083
+ NS_SWIFT_SENDABLE
2084
+ API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
2085
+ @interface NSURLSessionWebSocketTask : NSURLSessionTask
2086
+
2087
+ - (void)sendMessage:(NSURLSessionWebSocketMessage *)message completionHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))completionHandler;
2088
+
2089
+ - (void)receiveMessageWithCompletionHandler:(void (NS_SWIFT_SENDABLE ^)(NSURLSessionWebSocketMessage * _Nullable message, NSError * _Nullable error))completionHandler;
2090
+
2091
+ - (void)sendPingWithPongReceiveHandler:(void (NS_SWIFT_SENDABLE ^)(NSError * _Nullable error))pongReceiveHandler;
2092
+
2093
+ - (void)cancelWithCloseCode:(NSURLSessionWebSocketCloseCode)closeCode reason:(nullable NSData *)reason;
2094
+
2095
+ @property NSInteger maximumMessageSize;
2096
+
2097
+ @property (readonly) NSURLSessionWebSocketCloseCode closeCode;
2098
+
2099
+ @property (nullable, readonly, copy) NSData *closeReason;
2100
+
2101
+
2102
+ - (instancetype)init NS_UNAVAILABLE;
2103
+ + (instancetype)new NS_UNAVAILABLE;
2104
+
2105
+ @end
2106
+ typedef NS_ENUM(NSInteger, NSURLSessionMultipathServiceType)
2107
+ {
2108
+ NSURLSessionMultipathServiceTypeNone = 0,
2109
+ NSURLSessionMultipathServiceTypeHandover = 1,
2110
+ NSURLSessionMultipathServiceTypeInteractive = 2,
2111
+ NSURLSessionMultipathServiceTypeAggregate = 3
2112
+ } API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos) NS_SWIFT_NAME(URLSessionConfiguration.MultipathServiceType);
2113
+ typedef NS_ENUM(NSInteger, NSURLSessionTaskMetricsResourceFetchType) {
2114
+ NSURLSessionTaskMetricsResourceFetchTypeUnknown,
2115
+ NSURLSessionTaskMetricsResourceFetchTypeNetworkLoad,
2116
+ NSURLSessionTaskMetricsResourceFetchTypeServerPush API_DEPRECATED("Server push is no longer supported as of iOS 17 and aligned releases", macos(10.12,15.4), ios(10.0,18.4), watchos(3.0,11.4), tvos(10.0,18.4), visionos(1.0,2.4)),
2117
+ NSURLSessionTaskMetricsResourceFetchTypeLocalCache,
2118
+ } API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
2119
+ typedef NS_ENUM(NSInteger, NSURLSessionTaskMetricsDomainResolutionProtocol) {
2120
+ NSURLSessionTaskMetricsDomainResolutionProtocolUnknown,
2121
+ NSURLSessionTaskMetricsDomainResolutionProtocolUDP, /* Resolution used DNS over UDP. */
2122
+ NSURLSessionTaskMetricsDomainResolutionProtocolTCP, /* Resolution used DNS over TCP. */
2123
+ NSURLSessionTaskMetricsDomainResolutionProtocolTLS, /* Resolution used DNS over TLS. */
2124
+ NSURLSessionTaskMetricsDomainResolutionProtocolHTTPS, /* Resolution used DNS over HTTPS. */
2125
+ } API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
2126
+ NS_SWIFT_SENDABLE
2127
+ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
2128
+ @interface NSURLSessionTaskTransactionMetrics : NSObject
2129
+
2130
+ @property (copy, readonly) NSURLRequest *request;
2131
+
2132
+ @property (nullable, copy, readonly) NSURLResponse *response;
2133
+
2134
+
2135
+ @property (nullable, copy, readonly) NSDate *fetchStartDate;
2136
+
2137
+ @property (nullable, copy, readonly) NSDate *domainLookupStartDate;
2138
+
2139
+ @property (nullable, copy, readonly) NSDate *domainLookupEndDate;
2140
+
2141
+ @property (nullable, copy, readonly) NSDate *connectStartDate;
2142
+
2143
+ @property (nullable, copy, readonly) NSDate *secureConnectionStartDate;
2144
+
2145
+ @property (nullable, copy, readonly) NSDate *secureConnectionEndDate;
2146
+
2147
+ @property (nullable, copy, readonly) NSDate *connectEndDate;
2148
+
2149
+ @property (nullable, copy, readonly) NSDate *requestStartDate;
2150
+
2151
+ @property (nullable, copy, readonly) NSDate *requestEndDate;
2152
+
2153
+ @property (nullable, copy, readonly) NSDate *responseStartDate;
2154
+
2155
+ @property (nullable, copy, readonly) NSDate *responseEndDate;
2156
+
2157
+ @property (nullable, copy, readonly) NSString *networkProtocolName;
2158
+
2159
+ @property (assign, readonly, getter=isProxyConnection) BOOL proxyConnection;
2160
+
2161
+ @property (assign, readonly, getter=isReusedConnection) BOOL reusedConnection;
2162
+
2163
+ @property (assign, readonly) NSURLSessionTaskMetricsResourceFetchType resourceFetchType;
2164
+
2165
+ @property (readonly) int64_t countOfRequestHeaderBytesSent API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2166
+
2167
+ @property (readonly) int64_t countOfRequestBodyBytesSent API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2168
+
2169
+ @property (readonly) int64_t countOfRequestBodyBytesBeforeEncoding API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2170
+
2171
+ @property (readonly) int64_t countOfResponseHeaderBytesReceived API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2172
+
2173
+ @property (readonly) int64_t countOfResponseBodyBytesReceived API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2174
+
2175
+ @property (readonly) int64_t countOfResponseBodyBytesAfterDecoding API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2176
+
2177
+ @property (nullable, copy, readonly) NSString *localAddress API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2178
+
2179
+ @property (nullable, copy, readonly) NSNumber *localPort API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2180
+
2181
+ @property (nullable, copy, readonly) NSString *remoteAddress API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2182
+
2183
+ @property (nullable, copy, readonly) NSNumber *remotePort API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2184
+
2185
+ @property (nullable, copy, readonly) NSNumber *negotiatedTLSProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2186
+
2187
+ @property (nullable, copy, readonly) NSNumber *negotiatedTLSCipherSuite API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2188
+
2189
+ @property (readonly, getter=isCellular) BOOL cellular API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2190
+
2191
+ @property (readonly, getter=isExpensive) BOOL expensive API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2192
+
2193
+ @property (readonly, getter=isConstrained) BOOL constrained API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2194
+
2195
+ @property (readonly, getter=isMultipath) BOOL multipath API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2196
+
2197
+ @property (readonly) NSURLSessionTaskMetricsDomainResolutionProtocol domainResolutionProtocol API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
2198
+
2199
+
2200
+ - (instancetype)init API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
2201
+ + (instancetype)new API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
2202
+
2203
+ @end
2204
+ NS_SWIFT_NAME(URLSessionTaskMetrics)
2205
+ NS_SWIFT_SENDABLE
2206
+ API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0))
2207
+ @interface NSURLSessionTaskMetrics : NSObject
2208
+
2209
+ @property (copy, readonly) NSArray<NSURLSessionTaskTransactionMetrics *> *transactionMetrics;
2210
+
2211
+ @property (copy, readonly) NSDateInterval *taskInterval;
2212
+
2213
+ @property (assign, readonly) NSInteger redirectCount;
2214
+
2215
+
2216
+ - (instancetype)init API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
2217
+ + (instancetype)new API_DEPRECATED("Not supported", macos(10.12,10.15), ios(10.0,13.0), watchos(3.0,6.0), tvos(10.0,13.0));
2218
+
1805
2219
  @end
1806
2220
  NS_SWIFT_NAME(URLSessionConfiguration)
1807
- @interface NSURLSessionConfiguration : NSObject <NSCopying, NSSecureCoding>
1808
- @property (nullable, retain) NSURLCache *URLCache;
1809
- @property NSTimeInterval timeoutIntervalForRequest;
2221
+ NS_SWIFT_SENDABLE
2222
+ API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0))
2223
+ @interface NSURLSessionConfiguration : NSObject <NSCopying>
2224
+
1810
2225
  @property (class, readonly, strong) NSURLSessionConfiguration *defaultSessionConfiguration;
2226
+
2227
+ @property (class, readonly, strong) NSURLSessionConfiguration *ephemeralSessionConfiguration;
2228
+
2229
+ + (NSURLSessionConfiguration *)backgroundSessionConfigurationWithIdentifier:(NSString *)identifier API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2230
+
2231
+ @property (nullable, readonly, copy) NSString *identifier;
2232
+
2233
+ @property NSURLRequestCachePolicy requestCachePolicy;
2234
+
2235
+ @property NSTimeInterval timeoutIntervalForRequest;
2236
+
2237
+ @property NSTimeInterval timeoutIntervalForResource;
2238
+
2239
+ @property NSURLRequestNetworkServiceType networkServiceType;
2240
+
2241
+ @property BOOL allowsCellularAccess;
2242
+
2243
+ @property BOOL allowsExpensiveNetworkAccess API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2244
+
2245
+ @property BOOL allowsConstrainedNetworkAccess API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2246
+
2247
+ @property BOOL allowsUltraConstrainedNetworkAccess API_AVAILABLE(macos(26.1), ios(26.1), watchos(26.1), tvos(26.1), visionos(26.1));
2248
+
2249
+ @property BOOL requiresDNSSECValidation API_AVAILABLE(macos(13.0), ios(16.0), watchos(9.0), tvos(16.0));
2250
+
2251
+ @property BOOL waitsForConnectivity API_AVAILABLE(macos(10.13), ios(11.0), watchos(4.0), tvos(11.0));
2252
+
2253
+ @property (getter=isDiscretionary) BOOL discretionary API_AVAILABLE(macos(10.10), ios(7.0), watchos(2.0), tvos(9.0));
2254
+
2255
+ @property (nullable, copy) NSString *sharedContainerIdentifier API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2256
+
2257
+ @property BOOL sessionSendsLaunchEvents API_AVAILABLE(macos(11.0), ios(7.0), watchos(2.0), tvos(9.0));
2258
+
2259
+ @property (nullable, copy) NSDictionary *connectionProxyDictionary;
2260
+
2261
+ @property SSLProtocol TLSMinimumSupportedProtocol API_DEPRECATED_WITH_REPLACEMENT("TLSMinimumSupportedProtocolVersion", macos(10.9, API_TO_BE_DEPRECATED), ios(7.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
2262
+
2263
+ @property SSLProtocol TLSMaximumSupportedProtocol API_DEPRECATED_WITH_REPLACEMENT("TLSMaximumSupportedProtocolVersion", macos(10.9, API_TO_BE_DEPRECATED), ios(7.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
2264
+
2265
+ @property tls_protocol_version_t TLSMinimumSupportedProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2266
+
2267
+ @property tls_protocol_version_t TLSMaximumSupportedProtocolVersion API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2268
+
2269
+ @property BOOL HTTPShouldUsePipelining API_DEPRECATED("Only supported in the classic loader, please adopt HTTP/2 and HTTP/3 instead", macos(10.9,15.4), ios(7.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
2270
+
2271
+ @property BOOL HTTPShouldSetCookies;
2272
+
2273
+ @property NSHTTPCookieAcceptPolicy HTTPCookieAcceptPolicy;
2274
+
2275
+ @property (nullable, copy) NSDictionary *HTTPAdditionalHeaders;
2276
+
2277
+ @property NSInteger HTTPMaximumConnectionsPerHost;
2278
+
2279
+ @property (nullable, retain) NSHTTPCookieStorage *HTTPCookieStorage;
2280
+
2281
+ @property (nullable, retain) NSURLCredentialStorage *URLCredentialStorage;
2282
+
2283
+ @property (nullable, retain) NSURLCache *URLCache;
2284
+
2285
+ @property BOOL shouldUseExtendedBackgroundIdleMode API_DEPRECATED("Not supported", macos(10.11,15.4), ios(9.0,18.4), watchos(2.0,11.4), tvos(9.0,18.4), visionos(1.0,2.4));
2286
+
2287
+ @property (nullable, copy) NSArray<Class> *protocolClasses;
2288
+
2289
+ @property NSURLSessionMultipathServiceType multipathServiceType API_AVAILABLE(ios(11.0)) API_UNAVAILABLE(macos, watchos, tvos);
2290
+
2291
+ @property BOOL usesClassicLoadingMode API_AVAILABLE(macos(15.4), ios(18.4), watchos(11.4), tvos(18.4), visionos(2.4));
2292
+
2293
+ @property BOOL enablesEarlyData API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2294
+
2295
+
2296
+ - (instancetype)init API_DEPRECATED("Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2297
+ + (instancetype)new API_DEPRECATED("Please use NSURLSessionConfiguration.defaultSessionConfiguration or other class methods to create instances", macos(10.9,10.15), ios(7.0,13.0), watchos(2.0,6.0), tvos(9.0,13.0));
2298
+
2299
+ @end
2300
+ @interface NSURLSessionConfiguration (NSURLSessionDeprecated)
2301
+ + (NSURLSessionConfiguration *)backgroundSessionConfiguration:(NSString *)identifier API_DEPRECATED_WITH_REPLACEMENT("-backgroundSessionConfigurationWithIdentifier:", macos(10.9, 10.10), ios(7.0, 8.0), watchos(2.0, 2.0), tvos(9.0, 9.0));
1811
2302
  @end
1812
2303
  __attribute__((swift_bridge("UUID")))
1813
2304
  @interface NSUUID : NSObject <NSCopying, NSSecureCoding>
@@ -1830,13 +2321,77 @@ __attribute__((swift_bridge("IndexSet")))
1830
2321
  + (instancetype)indexSetWithIndexesInRange:(NSRange)range;
1831
2322
  @end
1832
2323
  @interface NSMutableIndexSet : NSIndexSet
2324
+ - (void)addIndex:(NSUInteger)value;
2325
+ - (void)removeIndex:(NSUInteger)value;
2326
+ - (void)removeAllIndexes;
2327
+ - (void)addIndexesInRange:(NSRange)range;
2328
+ - (void)removeIndexesInRange:(NSRange)range;
1833
2329
  @end
1834
2330
  __attribute__((swift_bridge("CharacterSet")))
1835
2331
  @interface NSCharacterSet : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>
2332
+ @property (readonly, class, copy) NSCharacterSet *controlCharacterSet;
2333
+ @property (readonly, class, copy) NSCharacterSet *whitespaceCharacterSet;
2334
+ @property (readonly, class, copy) NSCharacterSet *whitespaceAndNewlineCharacterSet;
1836
2335
  @property (readonly, class, copy) NSCharacterSet *decimalDigitCharacterSet;
2336
+ @property (readonly, class, copy) NSCharacterSet *letterCharacterSet;
2337
+ @property (readonly, class, copy) NSCharacterSet *lowercaseLetterCharacterSet;
2338
+ @property (readonly, class, copy) NSCharacterSet *uppercaseLetterCharacterSet;
2339
+ @property (readonly, class, copy) NSCharacterSet *nonBaseCharacterSet;
2340
+ @property (readonly, class, copy) NSCharacterSet *alphanumericCharacterSet;
2341
+ @property (readonly, class, copy) NSCharacterSet *decomposableCharacterSet;
2342
+ @property (readonly, class, copy) NSCharacterSet *illegalCharacterSet;
2343
+ @property (readonly, class, copy) NSCharacterSet *punctuationCharacterSet;
2344
+ @property (readonly, class, copy) NSCharacterSet *capitalizedLetterCharacterSet;
2345
+ @property (readonly, class, copy) NSCharacterSet *symbolCharacterSet;
2346
+ @property (readonly, class, copy) NSCharacterSet *newlineCharacterSet API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2347
+ - (BOOL)characterIsMember:(unichar)aCharacter;
1837
2348
  + (NSCharacterSet *)characterSetWithCharactersInString:(NSString *)aString;
1838
2349
  @property (readonly, copy) NSCharacterSet *invertedSet;
1839
2350
  @end
2351
+ @interface NSCharacterSet (NSURLUtilities)
2352
+ @property (class, readonly, copy) NSCharacterSet *URLUserAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2353
+ @property (class, readonly, copy) NSCharacterSet *URLPasswordAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2354
+ @property (class, readonly, copy) NSCharacterSet *URLHostAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2355
+ @property (class, readonly, copy) NSCharacterSet *URLPathAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2356
+ @property (class, readonly, copy) NSCharacterSet *URLQueryAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2357
+ @property (class, readonly, copy) NSCharacterSet *URLFragmentAllowedCharacterSet API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2358
+ @end
2359
+ @interface NSMutableCharacterSet : NSCharacterSet <NSCopying, NSMutableCopying, NSSecureCoding>
2360
+ - (void)addCharactersInRange:(NSRange)aRange;
2361
+ - (void)removeCharactersInRange:(NSRange)aRange;
2362
+ - (void)addCharactersInString:(NSString *)aString;
2363
+ - (void)removeCharactersInString:(NSString *)aString;
2364
+ - (void)formUnionWithCharacterSet:(NSCharacterSet *)otherSet;
2365
+ - (void)formIntersectionWithCharacterSet:(NSCharacterSet *)otherSet;
2366
+ - (void)invert;
2367
+ @end
2368
+ @interface NSScanner : NSObject <NSCopying>
2369
+ @property (readonly, copy) NSString *string;
2370
+ @property NSUInteger scanLocation;
2371
+ @property (nullable, copy) NSCharacterSet *charactersToBeSkipped;
2372
+ @property BOOL caseSensitive;
2373
+ @property (nullable, retain) id locale;
2374
+ - (instancetype)initWithString:(NSString *)string NS_DESIGNATED_INITIALIZER;
2375
+ @end
2376
+ @interface NSScanner (NSExtendedScanner)
2377
+ - (BOOL)scanInt:(nullable int *)result;
2378
+ - (BOOL)scanInteger:(nullable NSInteger *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2379
+ - (BOOL)scanLongLong:(nullable long long *)result;
2380
+ - (BOOL)scanUnsignedLongLong:(nullable unsigned long long *)result API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2381
+ - (BOOL)scanFloat:(nullable float *)result;
2382
+ - (BOOL)scanDouble:(nullable double *)result;
2383
+ - (BOOL)scanHexInt:(nullable unsigned *)result;
2384
+ - (BOOL)scanHexLongLong:(nullable unsigned long long *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2385
+ - (BOOL)scanHexFloat:(nullable float *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2386
+ - (BOOL)scanHexDouble:(nullable double *)result API_AVAILABLE(macos(10.5), ios(2.0), watchos(2.0), tvos(9.0));
2387
+ - (BOOL)scanString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result;
2388
+ - (BOOL)scanCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result;
2389
+ - (BOOL)scanUpToString:(NSString *)string intoString:(NSString * _Nullable * _Nullable)result;
2390
+ - (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString * _Nullable * _Nullable)result;
2391
+ @property (getter=isAtEnd, readonly) BOOL atEnd;
2392
+ + (instancetype)scannerWithString:(NSString *)string;
2393
+ + (id)localizedScannerWithString:(NSString *)string;
2394
+ @end
1840
2395
  FOUNDATION_EXPORT NSString * const NSUserActivityTypeBrowsingWeb;
1841
2396
  typedef NSString * NSLocaleKey NS_TYPED_ENUM;
1842
2397
  __attribute__((swift_bridge("Locale")))
@@ -1912,6 +2467,7 @@ __attribute__((swift_bridge("TimeZone")))
1912
2467
  @interface NSTimeZone : NSObject <NSCopying, NSSecureCoding>
1913
2468
  + (nullable instancetype)timeZoneWithName:(NSString *)tzName;
1914
2469
  @property (class, readonly, copy) NSTimeZone *localTimeZone;
2470
+ @property (readonly, copy) NSString *name;
1915
2471
  @property (nullable, readonly, copy) NSString *abbreviation;
1916
2472
  + (instancetype)timeZoneForSecondsFromGMT:(NSInteger)seconds;
1917
2473
  @end
@@ -2034,7 +2590,33 @@ typedef NS_OPTIONS(NSUInteger, NSCalendarUnit) {
2034
2590
  };
2035
2591
 
2036
2592
  typedef NSString * NSCalendarIdentifier NS_TYPED_EXTENSIBLE_ENUM;
2593
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierBangla API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2594
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierBuddhist API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2595
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierChinese API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2596
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierCoptic API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2597
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierDangi API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2598
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteAlem API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2599
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierEthiopicAmeteMihret API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2037
2600
  FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGregorian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2601
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierGujarati API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2602
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierHebrew API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2603
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierISO8601 API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2604
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIndian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2605
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamic API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2606
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicCivil API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2607
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicTabular API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2608
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierIslamicUmmAlQura API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2609
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierJapanese API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2610
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierKannada API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2611
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierMalayalam API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2612
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierMarathi API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2613
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierOdia API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2614
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierPersian API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2615
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierRepublicOfChina API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2616
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierTamil API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2617
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierTelugu API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2618
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierVietnamese API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2619
+ FOUNDATION_EXPORT NSCalendarIdentifier const NSCalendarIdentifierVikram API_AVAILABLE(macos(26.0), ios(26.0), watchos(26.0), tvos(26.0), visionos(26.0));
2038
2620
  __attribute__((swift_bridge("Calendar")))
2039
2621
  @interface NSCalendar : NSObject <NSCopying, NSSecureCoding>
2040
2622
  - (nullable id)initWithCalendarIdentifier:(NSCalendarIdentifier)ident NS_DESIGNATED_INITIALIZER;
@@ -2074,6 +2656,9 @@ FOUNDATION_EXPORT Class _Nullable NSClassFromString(NSString *aClassName);
2074
2656
  }
2075
2657
  #endif
2076
2658
  FOUNDATION_EXPORT NSErrorUserInfoKey const NSLocalizedDescriptionKey;
2659
+ /// A human-readable reason for the failure.
2660
+ FOUNDATION_EXPORT NSErrorUserInfoKey const NSLocalizedFailureReasonErrorKey; // NSString, a complete sentence (or more) describing why the operation failed.
2661
+ FOUNDATION_EXPORT NSErrorUserInfoKey const NSUnderlyingErrorKey __attribute__((swift_private));
2077
2662
  __attribute__((swift_bridge("Swift.Error")))
2078
2663
  @interface NSError : NSObject <NSCopying, NSSecureCoding>
2079
2664
  + (instancetype)errorWithDomain:(NSErrorDomain)domain code:(NSInteger)code userInfo:(nullable NSDictionary<NSErrorUserInfoKey, id> *)dict;
@@ -2170,6 +2755,10 @@ FOUNDATION_EXPORT void NSSetUncaughtExceptionHandler(NSUncaughtExceptionHandler
2170
2755
  - (void)setValue:(nullable id)value forKey:(NSString *)key;
2171
2756
  @end
2172
2757
  NS_SWIFT_NAME(Bundle)
2758
+ #if __has_feature(objc_arc)
2759
+ NS_INLINE CF_RETURNS_RETAINED CFTypeRef _Nullable CFBridgingRetain(id _Nullable X) { return (__bridge_retained CFTypeRef)X; }
2760
+ NS_INLINE id _Nullable CFBridgingRelease(CFTypeRef CF_CONSUMED _Nullable X) { return (__bridge_transfer id)X; }
2761
+ #endif
2173
2762
  @interface NSBundle : NSObject
2174
2763
  - (nullable NSString *)pathForResource:(nullable NSString *)name ofType:(nullable NSString *)ext;
2175
2764
  - (nullable id)objectForInfoDictionaryKey:(NSString *)key;
@@ -2182,9 +2771,16 @@ NS_SWIFT_NAME(Bundle)
2182
2771
  @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
2772
  @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)));
2184
2773
  @property (nullable, readonly, copy) NSString *executablePath;
2774
+ @property (nullable, readonly, copy) NSString *resourcePath;
2775
+ @property (nullable, readonly, copy) NSURL *privateFrameworksURL API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2776
+ @property (class, readonly, copy) NSArray<NSBundle *> *allBundles;
2777
+ + (NSArray<NSString *> *)pathsForResourcesOfType:(nullable NSString *)ext inDirectory:(NSString *)bundlePath;
2778
+ - (NSArray<NSString *> *)pathsForResourcesOfType:(nullable NSString *)ext inDirectory:(nullable NSString *)subpath;
2185
2779
  @property (nullable, readonly, copy) NSDictionary<NSString *, id> *infoDictionary;
2186
2780
  @property (class, readonly, strong) NSBundle *mainBundle;
2187
2781
  - (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)));
2782
+ + (nullable instancetype)bundleWithPath:(NSString *)path;
2783
+ + (nullable NSBundle *)bundleWithIdentifier:(NSString *)identifier;
2188
2784
  - (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
2785
  + (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)));
2190
2786
  + (NSBundle *)bundleForClass:(Class)aClass;
@@ -2208,6 +2804,7 @@ typedef NS_ENUM(NSInteger, NSOperationQueuePriority) {
2208
2804
  - (void)addOperation:(NSOperation *)op;
2209
2805
  @property (readonly) NSUInteger operationCount __attribute__((availability(macos,introduced=10.6,deprecated=100000,replacement="progress.completedUnitCount"), availability(ios,introduced=4.0,deprecated=100000,replacement="progress.completedUnitCount"), availability(watchos,introduced=2.0,deprecated=100000,replacement="progress.completedUnitCount"), availability(tvos,introduced=9.0,deprecated=100000,replacement="progress.completedUnitCount")));
2210
2806
  - (void)cancelAllOperations;
2807
+ @property NSQualityOfService qualityOfService API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
2211
2808
  @property (class, readonly, strong) NSOperationQueue *mainQueue __attribute__((availability(ios,introduced=4.0)));
2212
2809
  - (void)addOperationWithBlock:(void (NS_SWIFT_SENDABLE ^)(void))block __attribute__((availability(macos,introduced=10.6), availability(ios,introduced=4.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) NS_SWIFT_DISABLE_ASYNC;
2213
2810
  @property NSInteger maxConcurrentOperationCount;
@@ -2246,17 +2843,185 @@ NS_SWIFT_NAME(Thread)
2246
2843
  + (void)sleepForTimeInterval:(NSTimeInterval)ti NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Use Task.sleep(until:clock:) instead.");
2247
2844
  @property (readonly) BOOL isMainThread __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2248
2845
  @property (class, readonly) BOOL isMainThread __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0))) NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Work intended for the main actor should be marked with @MainActor");
2846
+ @property (readonly, retain) NSMutableDictionary *threadDictionary;
2847
+ @property (class, readonly, copy) NSArray<NSString *> *callStackSymbols API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2249
2848
  @end
2849
+ typedef NSString *NSRunLoopMode NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(RunLoop.Mode);
2250
2850
  NS_SWIFT_NAME(RunLoop)
2251
2851
  @interface NSRunLoop : NSObject
2852
+ @property (class, readonly, strong) NSRunLoop *currentRunLoop NS_SWIFT_UNAVAILABLE_FROM_ASYNC("currentRunLoop cannot be used from async contexts.");
2252
2853
  @property (class, readonly, strong) NSRunLoop *mainRunLoop __attribute__((availability(macos,introduced=10.5), availability(ios,introduced=2.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
2854
+ @property (nullable, readonly, copy) NSRunLoopMode currentMode;
2855
+ - (CFRunLoopRef)getCFRunLoop CF_RETURNS_NOT_RETAINED;
2856
+ - (nullable NSDate *)limitDateForMode:(NSRunLoopMode)mode;
2857
+ - (void)acceptInputForMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate NS_SWIFT_UNAVAILABLE_FROM_ASYNC("acceptInput(for:before:) cannot be used from async contexts.");
2858
+ @end
2859
+ @interface NSRunLoop (NSRunLoopConveniences)
2860
+ - (void)run NS_SWIFT_UNAVAILABLE_FROM_ASYNC("run cannot be used from async contexts.");
2861
+ - (void)runUntilDate:(NSDate *)limitDate NS_SWIFT_UNAVAILABLE_FROM_ASYNC("run(until:) cannot be used from async contexts.");
2862
+ - (BOOL)runMode:(NSRunLoopMode)mode beforeDate:(NSDate *)limitDate NS_SWIFT_UNAVAILABLE_FROM_ASYNC("run(_:before:) cannot be used from async contexts.");
2863
+ - (void)performInModes:(NSArray<NSRunLoopMode> *)modes block:(void (NS_SWIFT_SENDABLE ^)(void))block __attribute__((availability(macos,introduced=10.12), availability(ios,introduced=10.0), availability(watchos,introduced=3.0), availability(tvos,introduced=10.0)));
2864
+ - (void)performBlock:(void (NS_SWIFT_SENDABLE ^)(void))block __attribute__((availability(macos,introduced=10.12), availability(ios,introduced=10.0), availability(watchos,introduced=3.0), availability(tvos,introduced=10.0)));
2865
+ @end
2866
+ @interface NSRunLoop (NSOrderedPerform)
2867
+ - (void)performSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg order:(NSUInteger)order modes:(NSArray<NSRunLoopMode> *)modes;
2868
+ - (void)cancelPerformSelector:(SEL)aSelector target:(id)target argument:(nullable id)arg;
2869
+ - (void)cancelPerformSelectorsWithTarget:(id)target;
2253
2870
  @end
2254
- typedef NSString *NSRunLoopMode NS_TYPED_EXTENSIBLE_ENUM NS_SWIFT_NAME(RunLoop.Mode);
2255
2871
  NS_SWIFT_NAME(Timer)
2256
2872
  @interface NSTimer : NSObject
2257
2873
  + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti target:(id)aTarget selector:(SEL)aSelector userInfo:(nullable id)userInfo repeats:(BOOL)yesOrNo NS_SWIFT_UNAVAILABLE_FROM_ASYNC("Timers scheduled in an async context may never fire.");
2258
2874
  - (void)invalidate;
2259
2875
  @end
2876
+ typedef NS_ENUM(NSInteger, NSXMLParserError) {
2877
+ NSXMLParserInternalError = 1,
2878
+ NSXMLParserOutOfMemoryError = 2,
2879
+ NSXMLParserDocumentStartError = 3,
2880
+ NSXMLParserEmptyDocumentError = 4,
2881
+ NSXMLParserPrematureDocumentEndError = 5,
2882
+ NSXMLParserInvalidHexCharacterRefError = 6,
2883
+ NSXMLParserInvalidDecimalCharacterRefError = 7,
2884
+ NSXMLParserInvalidCharacterRefError = 8,
2885
+ NSXMLParserInvalidCharacterError = 9,
2886
+ NSXMLParserCharacterRefAtEOFError = 10,
2887
+ NSXMLParserCharacterRefInPrologError = 11,
2888
+ NSXMLParserCharacterRefInEpilogError = 12,
2889
+ NSXMLParserCharacterRefInDTDError = 13,
2890
+ NSXMLParserEntityRefAtEOFError = 14,
2891
+ NSXMLParserEntityRefInPrologError = 15,
2892
+ NSXMLParserEntityRefInEpilogError = 16,
2893
+ NSXMLParserEntityRefInDTDError = 17,
2894
+ NSXMLParserParsedEntityRefAtEOFError = 18,
2895
+ NSXMLParserParsedEntityRefInPrologError = 19,
2896
+ NSXMLParserParsedEntityRefInEpilogError = 20,
2897
+ NSXMLParserParsedEntityRefInInternalSubsetError = 21,
2898
+ NSXMLParserEntityReferenceWithoutNameError = 22,
2899
+ NSXMLParserEntityReferenceMissingSemiError = 23,
2900
+ NSXMLParserParsedEntityRefNoNameError = 24,
2901
+ NSXMLParserParsedEntityRefMissingSemiError = 25,
2902
+ NSXMLParserUndeclaredEntityError = 26,
2903
+ NSXMLParserUnparsedEntityError = 28,
2904
+ NSXMLParserEntityIsExternalError = 29,
2905
+ NSXMLParserEntityIsParameterError = 30,
2906
+ NSXMLParserUnknownEncodingError = 31,
2907
+ NSXMLParserEncodingNotSupportedError = 32,
2908
+ NSXMLParserStringNotStartedError = 33,
2909
+ NSXMLParserStringNotClosedError = 34,
2910
+ NSXMLParserNamespaceDeclarationError = 35,
2911
+ NSXMLParserEntityNotStartedError = 36,
2912
+ NSXMLParserEntityNotFinishedError = 37,
2913
+ NSXMLParserLessThanSymbolInAttributeError = 38,
2914
+ NSXMLParserAttributeNotStartedError = 39,
2915
+ NSXMLParserAttributeNotFinishedError = 40,
2916
+ NSXMLParserAttributeHasNoValueError = 41,
2917
+ NSXMLParserAttributeRedefinedError = 42,
2918
+ NSXMLParserLiteralNotStartedError = 43,
2919
+ NSXMLParserLiteralNotFinishedError = 44,
2920
+ NSXMLParserCommentNotFinishedError = 45,
2921
+ NSXMLParserProcessingInstructionNotStartedError = 46,
2922
+ NSXMLParserProcessingInstructionNotFinishedError = 47,
2923
+ NSXMLParserNotationNotStartedError = 48,
2924
+ NSXMLParserNotationNotFinishedError = 49,
2925
+ NSXMLParserAttributeListNotStartedError = 50,
2926
+ NSXMLParserAttributeListNotFinishedError = 51,
2927
+ NSXMLParserMixedContentDeclNotStartedError = 52,
2928
+ NSXMLParserMixedContentDeclNotFinishedError = 53,
2929
+ NSXMLParserElementContentDeclNotStartedError = 54,
2930
+ NSXMLParserElementContentDeclNotFinishedError = 55,
2931
+ NSXMLParserXMLDeclNotStartedError = 56,
2932
+ NSXMLParserXMLDeclNotFinishedError = 57,
2933
+ NSXMLParserConditionalSectionNotStartedError = 58,
2934
+ NSXMLParserConditionalSectionNotFinishedError = 59,
2935
+ NSXMLParserExternalSubsetNotFinishedError = 60,
2936
+ NSXMLParserDOCTYPEDeclNotFinishedError = 61,
2937
+ NSXMLParserMisplacedCDATAEndStringError = 62,
2938
+ NSXMLParserCDATANotFinishedError = 63,
2939
+ NSXMLParserMisplacedXMLDeclarationError = 64,
2940
+ NSXMLParserSpaceRequiredError = 65,
2941
+ NSXMLParserSeparatorRequiredError = 66,
2942
+ NSXMLParserNMTOKENRequiredError = 67,
2943
+ NSXMLParserNAMERequiredError = 68,
2944
+ NSXMLParserPCDATARequiredError = 69,
2945
+ NSXMLParserURIRequiredError = 70,
2946
+ NSXMLParserPublicIdentifierRequiredError = 71,
2947
+ NSXMLParserLTRequiredError = 72,
2948
+ NSXMLParserGTRequiredError = 73,
2949
+ NSXMLParserLTSlashRequiredError = 74,
2950
+ NSXMLParserEqualExpectedError = 75,
2951
+ NSXMLParserTagNameMismatchError = 76,
2952
+ NSXMLParserUnfinishedTagError = 77,
2953
+ NSXMLParserStandaloneValueError = 78,
2954
+ NSXMLParserInvalidEncodingNameError = 79,
2955
+ NSXMLParserCommentContainsDoubleHyphenError = 80,
2956
+ NSXMLParserInvalidEncodingError = 81,
2957
+ NSXMLParserExternalStandaloneEntityError = 82,
2958
+ NSXMLParserInvalidConditionalSectionError = 83,
2959
+ NSXMLParserEntityValueRequiredError = 84,
2960
+ NSXMLParserNotWellBalancedError = 85,
2961
+ NSXMLParserExtraContentError = 86,
2962
+ NSXMLParserInvalidCharacterInEntityError = 87,
2963
+ NSXMLParserParsedEntityRefInInternalError = 88,
2964
+ NSXMLParserEntityRefLoopError = 89,
2965
+ NSXMLParserEntityBoundaryError = 90,
2966
+ NSXMLParserInvalidURIError = 91,
2967
+ NSXMLParserURIFragmentError = 92,
2968
+ NSXMLParserNoDTDError = 94,
2969
+ NSXMLParserDelegateAbortedParseError = 512,
2970
+ } API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
2971
+ typedef NS_ENUM(NSUInteger, NSXMLParserExternalEntityResolvingPolicy) {
2972
+ NSXMLParserResolveExternalEntitiesNever = 0,
2973
+ NSXMLParserResolveExternalEntitiesNoNetwork,
2974
+ NSXMLParserResolveExternalEntitiesSameOriginOnly,
2975
+ NSXMLParserResolveExternalEntitiesAlways,
2976
+ } API_AVAILABLE(macos(10.9), ios(7.0), watchos(2.0), tvos(9.0));
2977
+ @protocol NSXMLParserDelegate;
2978
+ NS_SWIFT_NAME(XMLParser)
2979
+ API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0))
2980
+ @interface NSXMLParser : NSObject
2981
+ - (nullable instancetype)initWithContentsOfURL:(NSURL *)url;
2982
+ - (instancetype)initWithData:(NSData *)data NS_DESIGNATED_INITIALIZER;
2983
+ - (instancetype)initWithStream:(NSInputStream *)stream;
2984
+ @property (nullable, assign) id <NSXMLParserDelegate> delegate;
2985
+ @property BOOL shouldProcessNamespaces;
2986
+ @property BOOL shouldReportNamespacePrefixes;
2987
+ @property NSXMLParserExternalEntityResolvingPolicy externalEntityResolvingPolicy;
2988
+ @property (nullable, copy) NSSet<NSURL *> *allowedExternalEntityURLs;
2989
+ - (BOOL)parse;
2990
+ - (void)abortParsing;
2991
+ @property (nullable, readonly, copy) NSError *parserError;
2992
+ @property BOOL shouldResolveExternalEntities;
2993
+ @end
2994
+ @interface NSXMLParser (NSXMLParserLocatorAdditions)
2995
+ @property (nullable, readonly, copy) NSString *publicID;
2996
+ @property (nullable, readonly, copy) NSString *systemID;
2997
+ @property (readonly) NSInteger lineNumber;
2998
+ @property (readonly) NSInteger columnNumber;
2999
+ @end
3000
+ NS_SWIFT_NAME(XMLParserDelegate)
3001
+ API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0))
3002
+ @protocol NSXMLParserDelegate <NSObject>
3003
+ @optional
3004
+ - (void)parserDidStartDocument:(NSXMLParser *)parser;
3005
+ - (void)parserDidEndDocument:(NSXMLParser *)parser;
3006
+ - (void)parser:(NSXMLParser *)parser foundNotationDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID;
3007
+ - (void)parser:(NSXMLParser *)parser foundUnparsedEntityDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID notationName:(nullable NSString *)notationName;
3008
+ - (void)parser:(NSXMLParser *)parser foundAttributeDeclarationWithName:(NSString *)attributeName forElement:(NSString *)elementName type:(nullable NSString *)type defaultValue:(nullable NSString *)defaultValue;
3009
+ - (void)parser:(NSXMLParser *)parser foundElementDeclarationWithName:(NSString *)elementName model:(NSString *)model;
3010
+ - (void)parser:(NSXMLParser *)parser foundInternalEntityDeclarationWithName:(NSString *)name value:(nullable NSString *)value;
3011
+ - (void)parser:(NSXMLParser *)parser foundExternalEntityDeclarationWithName:(NSString *)name publicID:(nullable NSString *)publicID systemID:(nullable NSString *)systemID;
3012
+ - (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(nullable NSString *)namespaceURI qualifiedName:(nullable NSString *)qName attributes:(NSDictionary<NSString *, NSString *> *)attributeDict;
3013
+ - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(nullable NSString *)namespaceURI qualifiedName:(nullable NSString *)qName;
3014
+ - (void)parser:(NSXMLParser *)parser didStartMappingPrefix:(NSString *)prefix toURI:(NSString *)namespaceURI;
3015
+ - (void)parser:(NSXMLParser *)parser didEndMappingPrefix:(NSString *)prefix;
3016
+ - (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string;
3017
+ - (void)parser:(NSXMLParser *)parser foundIgnorableWhitespace:(NSString *)whitespaceString;
3018
+ - (void)parser:(NSXMLParser *)parser foundProcessingInstructionWithTarget:(NSString *)target data:(nullable NSString *)data;
3019
+ - (void)parser:(NSXMLParser *)parser foundComment:(NSString *)comment;
3020
+ - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock;
3021
+ - (nullable NSData *)parser:(NSXMLParser *)parser resolveExternalEntityName:(NSString *)name systemID:(nullable NSString *)systemID;
3022
+ - (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError;
3023
+ - (void)parser:(NSXMLParser *)parser validationErrorOccurred:(NSError *)validationError;
3024
+ @end
2260
3025
  typedef NS_ENUM(NSUInteger, NSSearchPathDirectory) {
2261
3026
  NSApplicationDirectory = 1,
2262
3027
  NSDemoApplicationDirectory,
@@ -2567,8 +3332,18 @@ NS_SWIFT_NAME(FileHandle)
2567
3332
  - (void)synchronizeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="synchronizeAndReturnError:")));
2568
3333
  - (void)closeFile __attribute__((availability(ios,introduced=2.0,deprecated=100000,replacement="closeAndReturnError:")));
2569
3334
  @end
3335
+ typedef struct NS_SWIFT_SENDABLE {
3336
+ /// The major release number, such as 10 in version 10.9.3.
3337
+ NSInteger majorVersion;
3338
+ /// The minor release number, such as 9 in version 10.9.3.
3339
+ NSInteger minorVersion;
3340
+ /// The update release number, such as 3 in version 10.9.3.
3341
+ NSInteger patchVersion;
3342
+ } NSOperatingSystemVersion NS_SWIFT_NAME(OperatingSystemVersion);
2570
3343
  NS_SWIFT_NAME(ProcessInfo)
2571
3344
  @interface NSProcessInfo : NSObject
3345
+ @property (readonly, copy) NSArray<NSString *> *arguments;
3346
+ @property (readonly) NSTimeInterval systemUptime API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
2572
3347
  @property (readonly, copy) NSString *globallyUniqueString;
2573
3348
  @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
3349
  @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)));
@@ -2578,6 +3353,10 @@ NS_SWIFT_NAME(ProcessInfo)
2578
3353
  @property (readonly, copy) NSDictionary<NSString *, NSString *> *environment;
2579
3354
  @property (readonly) NSUInteger processorCount __attribute__((availability(ios,introduced=2.0)));
2580
3355
  @end
3356
+ @interface NSProcessInfo (NSProcessInfoVersion)
3357
+ @property (readonly) NSOperatingSystemVersion operatingSystemVersion API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3358
+ - (BOOL) isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion)version API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3359
+ @end
2581
3360
  @interface NSProcessInfo (NSProcessInfoPlatform)
2582
3361
  @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
3362
  @end
@@ -3023,31 +3802,113 @@ NS_SWIFT_NAME(NSKeyedArchiver)
3023
3802
  + (nullable NSData *)archivedDataWithRootObject:(id)object requiringSecureCoding:(BOOL)requiresSecureCoding error:(NSError **)error __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
3024
3803
  + (BOOL)archiveRootObject:(id)rootObject toFile:(NSString *)path __attribute__((availability(macosx,introduced=10.2,deprecated=10.14,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"), availability(ios,introduced=2.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"), availability(watchos,introduced=2.0,deprecated=5.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead"), availability(tvos,introduced=9.0,deprecated=12.0,message="Use +archivedDataWithRootObject:requiringSecureCoding:error: and -writeToURL:options:error: instead")));
3025
3804
  @end
3805
+ @protocol NSStreamDelegate;
3806
+ typedef NSString * NSStreamPropertyKey NS_TYPED_EXTENSIBLE_ENUM;
3807
+ typedef NS_ENUM(NSUInteger, NSStreamStatus) {
3808
+ NSStreamStatusNotOpen = 0,
3809
+ NSStreamStatusOpening = 1,
3810
+ NSStreamStatusOpen = 2,
3811
+ NSStreamStatusReading = 3,
3812
+ NSStreamStatusWriting = 4,
3813
+ NSStreamStatusAtEnd = 5,
3814
+ NSStreamStatusClosed = 6,
3815
+ NSStreamStatusError = 7
3816
+ };
3817
+ typedef NS_OPTIONS(NSUInteger, NSStreamEvent) {
3818
+ NSStreamEventNone = 0,
3819
+ NSStreamEventOpenCompleted = 1UL << 0,
3820
+ NSStreamEventHasBytesAvailable = 1UL << 1,
3821
+ NSStreamEventHasSpaceAvailable = 1UL << 2,
3822
+ NSStreamEventErrorOccurred = 1UL << 3,
3823
+ NSStreamEventEndEncountered = 1UL << 4
3824
+ };
3026
3825
  NS_SWIFT_NAME(Stream)
3027
3826
  @interface NSStream : NSObject
3028
3827
  - (void)open;
3029
3828
  - (void)close;
3829
+ @property (nullable, assign /* actually weak */) id <NSStreamDelegate> delegate;
3830
+ - (nullable id)propertyForKey:(NSStreamPropertyKey)key;
3831
+ - (BOOL)setProperty:(nullable id)property forKey:(NSStreamPropertyKey)key;
3832
+ - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode;
3833
+ - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSRunLoopMode)mode;
3834
+ @property (readonly) NSStreamStatus streamStatus;
3835
+ @property (nullable, readonly, copy) NSError *streamError;
3030
3836
  @end
3031
3837
  NS_SWIFT_NAME(InputStream)
3032
3838
  @interface NSInputStream : NSStream
3033
- + (nullable instancetype)inputStreamWithData:(NSData *)data;
3034
3839
  - (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len;
3840
+ - (BOOL)getBuffer:(uint8_t * _Nullable * _Nonnull)buffer length:(NSUInteger *)len;
3841
+ @property (readonly) BOOL hasBytesAvailable;
3842
+ - (instancetype)initWithData:(NSData *)data NS_DESIGNATED_INITIALIZER;
3843
+ - (nullable instancetype)initWithURL:(NSURL *)url API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
3035
3844
  @end
3036
3845
  NS_SWIFT_NAME(OutputStream)
3037
3846
  @interface NSOutputStream : NSStream
3847
+ - (NSInteger)write:(const uint8_t *)buffer maxLength:(NSUInteger)len;
3848
+ @property (readonly) BOOL hasSpaceAvailable;
3849
+ - (instancetype)initToMemory NS_DESIGNATED_INITIALIZER;
3850
+ - (instancetype)initToBuffer:(uint8_t *)buffer capacity:(NSUInteger)capacity NS_DESIGNATED_INITIALIZER;
3851
+ - (nullable instancetype)initWithURL:(NSURL *)url append:(BOOL)shouldAppend API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0)) NS_DESIGNATED_INITIALIZER;
3038
3852
  @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
- };
3853
+ @interface NSStream (NSSocketStreamCreationExtensions)
3854
+ + (void)getStreamsToHostWithName:(NSString *)hostname port:(NSInteger)port inputStream:(NSInputStream * _Nullable * _Nullable)inputStream outputStream:(NSOutputStream * _Nullable * _Nullable)outputStream API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.10, API_TO_BE_DEPRECATED), ios(8.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED)) API_UNAVAILABLE(watchos);
3855
+ @end
3856
+ @interface NSStream (NSStreamBoundPairCreationExtensions)
3857
+ + (void)getBoundStreamsWithBufferSize:(NSUInteger)bufferSize inputStream:(NSInputStream * _Nullable * _Nullable)inputStream outputStream:(NSOutputStream * _Nullable * _Nullable)outputStream API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3858
+ @end
3859
+ @interface NSInputStream (NSInputStreamExtensions)
3860
+ - (nullable instancetype)initWithFileAtPath:(NSString *)path;
3861
+ + (nullable instancetype)inputStreamWithData:(NSData *)data;
3862
+ + (nullable instancetype)inputStreamWithFileAtPath:(NSString *)path;
3863
+ + (nullable instancetype)inputStreamWithURL:(NSURL *)url API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
3864
+ @end
3865
+ @interface NSOutputStream (NSOutputStreamExtensions)
3866
+ - (nullable instancetype)initToFileAtPath:(NSString *)path append:(BOOL)shouldAppend;
3867
+ + (instancetype)outputStreamToMemory;
3868
+ + (instancetype)outputStreamToBuffer:(uint8_t *)buffer capacity:(NSUInteger)capacity;
3869
+ + (instancetype)outputStreamToFileAtPath:(NSString *)path append:(BOOL)shouldAppend;
3870
+ + (nullable instancetype)outputStreamWithURL:(NSURL *)url append:(BOOL)shouldAppend API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));
3871
+ @end
3872
+ NS_SWIFT_NAME(StreamDelegate)
3047
3873
  @protocol NSStreamDelegate <NSObject>
3048
3874
  @optional
3049
3875
  - (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode;
3050
3876
  @end
3877
+ FOUNDATION_EXPORT NSStreamPropertyKey const NSStreamSocketSecurityLevelKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3878
+ typedef NSString * NSStreamSocketSecurityLevel NS_TYPED_ENUM;
3879
+ FOUNDATION_EXPORT NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelNone API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3880
+ FOUNDATION_EXPORT NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelSSLv2 API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3881
+ FOUNDATION_EXPORT NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelSSLv3 API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3882
+ FOUNDATION_EXPORT NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelTLSv1 API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3883
+ FOUNDATION_EXPORT NSStreamSocketSecurityLevel const NSStreamSocketSecurityLevelNegotiatedSSL API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3884
+ FOUNDATION_EXPORT NSStreamPropertyKey const NSStreamSOCKSProxyConfigurationKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3885
+ typedef NSString * NSStreamSOCKSProxyConfiguration NS_TYPED_ENUM;
3886
+ FOUNDATION_EXPORT NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyHostKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3887
+ FOUNDATION_EXPORT NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyPortKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3888
+ FOUNDATION_EXPORT NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyVersionKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3889
+ FOUNDATION_EXPORT NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyUserKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3890
+ FOUNDATION_EXPORT NSStreamSOCKSProxyConfiguration const NSStreamSOCKSProxyPasswordKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3891
+ typedef NSString * NSStreamSOCKSProxyVersion NS_TYPED_ENUM;
3892
+ FOUNDATION_EXPORT NSStreamSOCKSProxyVersion const NSStreamSOCKSProxyVersion4 API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3893
+ FOUNDATION_EXPORT NSStreamSOCKSProxyVersion const NSStreamSOCKSProxyVersion5 API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3894
+ FOUNDATION_EXPORT NSStreamPropertyKey const NSStreamDataWrittenToMemoryStreamKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3895
+ FOUNDATION_EXPORT NSStreamPropertyKey const NSStreamFileCurrentOffsetKey API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3896
+ FOUNDATION_EXPORT NSErrorDomain const NSStreamSocketSSLErrorDomain API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3897
+ FOUNDATION_EXPORT NSErrorDomain const NSStreamSOCKSErrorDomain API_AVAILABLE(macos(10.3), ios(2.0), watchos(2.0), tvos(9.0));
3898
+ FOUNDATION_EXPORT NSStreamPropertyKey const NSStreamNetworkServiceType API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
3899
+ typedef NSString * NSStreamNetworkServiceTypeValue NS_TYPED_ENUM;
3900
+ FOUNDATION_EXPORT NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVoIP API_AVAILABLE(macos(10.7), ios(4.0), watchos(2.0), tvos(9.0));
3901
+ FOUNDATION_EXPORT NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVideo API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
3902
+ FOUNDATION_EXPORT NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeBackground API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
3903
+ FOUNDATION_EXPORT NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeVoice API_AVAILABLE(macos(10.7), ios(5.0), watchos(2.0), tvos(9.0));
3904
+ FOUNDATION_EXPORT NSStreamNetworkServiceTypeValue const NSStreamNetworkServiceTypeCallSignaling API_AVAILABLE(macosx(10.12), ios(10.0), watchos(3.0), tvos(10.0));
3905
+ typedef NS_ENUM(NSUInteger, NSDateFormatterStyle) {
3906
+ NSDateFormatterNoStyle = 0,
3907
+ NSDateFormatterShortStyle = 1,
3908
+ NSDateFormatterMediumStyle = 2,
3909
+ NSDateFormatterLongStyle = 3,
3910
+ NSDateFormatterFullStyle = 4
3911
+ };
3051
3912
  typedef NS_ENUM(NSUInteger, NSDateFormatterBehavior) { NSDateFormatterBehaviorDefault = 0, NSDateFormatterBehavior10_4 = 1040 };
3052
3913
  NS_SWIFT_NAME(Formatter)
3053
3914
  @interface NSFormatter : NSObject <NSCopying, NSCoding>
@@ -3056,11 +3917,57 @@ NS_SWIFT_NAME(DateFormatter)
3056
3917
  @interface NSDateFormatter : NSFormatter
3057
3918
  @property NSDateFormatterBehavior formatterBehavior;
3058
3919
  @property (null_resettable, copy) NSString *dateFormat;
3920
+ @property NSDateFormatterStyle dateStyle;
3921
+ @property NSDateFormatterStyle timeStyle;
3059
3922
  @property (null_resettable, copy) NSLocale *locale;
3060
3923
  @property (null_resettable, copy) NSTimeZone *timeZone;
3061
3924
  - (NSString *)stringFromDate:(NSDate *)date;
3062
3925
  - (nullable NSDate *)dateFromString:(NSString *)string;
3063
3926
  @end
3927
+ typedef NS_ENUM(NSInteger, NSFormattingUnitStyle) {
3928
+ NSFormattingUnitStyleShort = 1,
3929
+ NSFormattingUnitStyleMedium,
3930
+ NSFormattingUnitStyleLong,
3931
+ } API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
3932
+ typedef NS_OPTIONS(NSUInteger, NSMeasurementFormatterUnitOptions) {
3933
+ NSMeasurementFormatterUnitOptionsProvidedUnit = (1UL << 0),
3934
+ NSMeasurementFormatterUnitOptionsNaturalScale = (1UL << 1),
3935
+ NSMeasurementFormatterUnitOptionsTemperatureWithoutUnit = (1UL << 2),
3936
+ } API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0));
3937
+ NS_SWIFT_SENDABLE
3938
+ API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
3939
+ @interface NSUnit : NSObject <NSCopying, NSSecureCoding>
3940
+ @property (readonly, copy) NSString *symbol;
3941
+ + (instancetype)new NS_UNAVAILABLE;
3942
+ - (instancetype)init NS_UNAVAILABLE;
3943
+ - (instancetype)initWithSymbol:(NSString *)symbol NS_DESIGNATED_INITIALIZER;
3944
+ @end
3945
+ NS_SWIFT_SENDABLE
3946
+ API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
3947
+ @interface NSDimension : NSUnit <NSSecureCoding>
3948
+ @end
3949
+ NS_SWIFT_SENDABLE
3950
+ API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
3951
+ @interface NSUnitTemperature : NSDimension
3952
+ @property (class, readonly, copy) NSUnitTemperature *kelvin;
3953
+ @property (class, readonly, copy) NSUnitTemperature *celsius;
3954
+ @property (class, readonly, copy) NSUnitTemperature *fahrenheit;
3955
+ @end
3956
+ NS_SWIFT_SENDABLE
3957
+ API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
3958
+ @interface NSMeasurement<__covariant UnitType : NSUnit *> : NSObject <NSCopying, NSSecureCoding>
3959
+ @property (readonly, copy) UnitType unit;
3960
+ @property (readonly) double doubleValue;
3961
+ - (instancetype)init NS_UNAVAILABLE;
3962
+ - (instancetype)initWithDoubleValue:(double)doubleValue unit:(UnitType)unit NS_DESIGNATED_INITIALIZER;
3963
+ @end
3964
+ API_AVAILABLE(macos(10.12), ios(10.0), watchos(3.0), tvos(10.0))
3965
+ @interface NSMeasurementFormatter : NSFormatter <NSSecureCoding>
3966
+ @property NSMeasurementFormatterUnitOptions unitOptions;
3967
+ @property NSFormattingUnitStyle unitStyle;
3968
+ @property (null_resettable, copy) NSLocale *locale;
3969
+ - (NSString *)stringFromMeasurement:(NSMeasurement *)measurement;
3970
+ @end
3064
3971
  NS_SWIFT_NAME(NumberFormatter)
3065
3972
  @interface NSNumberFormatter : NSObject
3066
3973
  @end
@@ -3085,46 +3992,10 @@ __attribute__((availability(ios,introduced=5.0)))
3085
3992
  + (nullable NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt error:(NSError * _Nullable * _Nullable)error;
3086
3993
  + (nullable id)JSONObjectWithData:(NSData * _Nonnull)data options:(NSJSONReadingOptions)opt error:(NSError * _Nullable * _Nullable)error;
3087
3994
  @end
3088
- typedef NS_OPTIONS(NSUInteger, NSPointerFunctionsOptions) {
3089
- NSPointerFunctionsStrongMemory __attribute__((availability(ios,introduced=6.0))) = (0UL << 0),
3090
- NSPointerFunctionsOpaqueMemory __attribute__((availability(ios,introduced=6.0))) = (2UL << 0),
3091
- NSPointerFunctionsMallocMemory __attribute__((availability(ios,introduced=6.0))) = (3UL << 0),
3092
- NSPointerFunctionsMachVirtualMemory __attribute__((availability(ios,introduced=6.0))) = (4UL << 0),
3093
- NSPointerFunctionsWeakMemory __attribute__((availability(ios,introduced=6.0))) = (5UL << 0),
3094
- NSPointerFunctionsObjectPersonality __attribute__((availability(ios,introduced=6.0))) = (0UL << 8),
3095
- NSPointerFunctionsOpaquePersonality __attribute__((availability(ios,introduced=6.0))) = (1UL << 8),
3096
- NSPointerFunctionsObjectPointerPersonality __attribute__((availability(ios,introduced=6.0))) = (2UL << 8),
3097
- NSPointerFunctionsCStringPersonality __attribute__((availability(ios,introduced=6.0))) = (3UL << 8),
3098
- NSPointerFunctionsStructPersonality __attribute__((availability(ios,introduced=6.0))) = (4UL << 8),
3099
- NSPointerFunctionsIntegerPersonality __attribute__((availability(ios,introduced=6.0))) = (5UL << 8),
3100
- NSPointerFunctionsCopyIn __attribute__((availability(ios,introduced=6.0))) = (1UL << 16)
3101
- };
3102
- __attribute__((availability(ios,introduced=6.0)))
3103
- @interface NSPointerFunctions : NSObject <NSCopying>
3104
- - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options NS_DESIGNATED_INITIALIZER;
3105
- + (NSPointerFunctions *)pointerFunctionsWithOptions:(NSPointerFunctionsOptions)options;
3106
- @end
3107
- __attribute__((availability(ios,introduced=6.0)))
3108
- @interface NSPointerArray : NSObject <NSFastEnumeration, NSCopying, NSSecureCoding>
3109
- - (instancetype)initWithOptions:(NSPointerFunctionsOptions)options NS_DESIGNATED_INITIALIZER;
3110
- - (instancetype)initWithPointerFunctions:(NSPointerFunctions *)functions NS_DESIGNATED_INITIALIZER;
3111
- + (NSPointerArray *)pointerArrayWithOptions:(NSPointerFunctionsOptions)options;
3112
- + (NSPointerArray *)pointerArrayWithPointerFunctions:(NSPointerFunctions *)functions;
3113
- @property (readonly, copy) NSPointerFunctions *pointerFunctions;
3114
- - (nullable void *)pointerAtIndex:(NSUInteger)index;
3115
- - (void)addPointer:(nullable void *)pointer;
3116
- - (void)removePointerAtIndex:(NSUInteger)index;
3117
- - (void)insertPointer:(nullable void *)item atIndex:(NSUInteger)index;
3118
- - (void)replacePointerAtIndex:(NSUInteger)index withPointer:(nullable void *)item;
3119
- - (void)compact;
3120
- @property NSUInteger count;
3121
- @end
3122
- @interface NSPointerArray (NSPointerArrayConveniences)
3123
- + (NSPointerArray *)strongObjectsPointerArray __attribute__((availability(ios,introduced=6.0)));
3124
- + (NSPointerArray *)weakObjectsPointerArray __attribute__((availability(ios,introduced=6.0)));
3125
- @property (readonly, copy) NSArray *allObjects;
3126
- @end
3127
3995
  @interface NSPredicate : NSObject <NSSecureCoding, NSCopying>
3996
+ #ifndef __swift__
3997
+ + (NSPredicate *)predicateWithBlock:(BOOL (^)(id _Nullable evaluatedObject, NSDictionary<NSString *, id> *_Nullable bindings))block;
3998
+ #endif
3128
3999
  @end
3129
4000
  @interface NSSortDescriptor : NSObject <NSSecureCoding, NSCopying>
3130
4001
  @end
@@ -3150,16 +4021,6 @@ __attribute__((availability(ios,introduced=6.0)))
3150
4021
  @property NSUInteger countLimit;
3151
4022
  @property BOOL evictsObjectsWithDiscardedContent;
3152
4023
  @end
3153
- @interface NSMapTable<KeyType, ObjectType> : NSObject <NSCopying, NSSecureCoding, NSFastEnumeration>
3154
- - (void)removeAllObjects;
3155
- + (NSMapTable<KeyType, ObjectType> *)mapTableWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions;
3156
- - (instancetype)initWithKeyOptions:(NSPointerFunctionsOptions)keyOptions valueOptions:(NSPointerFunctionsOptions)valueOptions capacity:(NSUInteger)initialCapacity NS_DESIGNATED_INITIALIZER;
3157
- - (nullable ObjectType)objectForKey:(nullable KeyType)aKey;
3158
- - (void)removeObjectForKey:(nullable KeyType)aKey;
3159
- - (void)setObject:(nullable ObjectType)anObject forKey:(nullable KeyType)aKey;
3160
- @end
3161
- @interface NSHashTable<ObjectType> : NSObject <NSCopying, NSSecureCoding, NSFastEnumeration>
3162
- @end
3163
4024
  NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available")
3164
4025
  @interface NSMethodSignature : NSObject
3165
4026
  + (nullable NSMethodSignature *)signatureWithObjCTypes:(const char *)types;
@@ -3192,6 +4053,8 @@ NS_SWIFT_UNAVAILABLE("NSInvocation and related APIs not available")
3192
4053
  @end
3193
4054
  @interface NSUserActivity : NSObject
3194
4055
  @property (readonly, copy) NSString *activityType;
4056
+ - (instancetype)initWithActivityType:(NSString *)activityType NS_DESIGNATED_INITIALIZER;
4057
+ - (instancetype)init NS_DESIGNATED_INITIALIZER;
3195
4058
  @property (nullable, copy) NSURL *webpageURL;
3196
4059
  @property (nullable, copy) NSURL *referrerURL __attribute__((availability(macos,introduced=10.13), availability(ios,introduced=11.0), availability(watchos,introduced=4.0), availability(tvos,introduced=11.0)));
3197
4060
  @end
@@ -3200,6 +4063,7 @@ FOUNDATION_EXPORT NSString *NSStringFromSelector(SEL aSelector);
3200
4063
  FOUNDATION_EXPORT SEL NSSelectorFromString(NSString *aSelectorName);
3201
4064
  FOUNDATION_EXPORT NSString *NSStringFromClass(Class aClass);
3202
4065
  FOUNDATION_EXPORT void NSLog(NSString *format, ...) NS_FORMAT_FUNCTION(1,2) NS_SWIFT_UNAVAILABLE("Use print or os_log");
4066
+ FOUNDATION_EXPORT void NSLogv(NSString *format, va_list args) NS_FORMAT_FUNCTION(1,0) NS_SWIFT_UNAVAILABLE("Use print or os_log");
3203
4067
  #define NSLocalizedStringFromTableInBundle(key, tbl, bundle, comment) [bundle localizedStringForKey:(key) value:@"" table:(tbl)]
3204
4068
  FOUNDATION_EXPORT NSLocaleKey const NSLocaleCountryCode;
3205
4069
  FOUNDATION_EXPORT NSLocaleKey const NSLocaleLanguageCode;
@@ -3262,16 +4126,9 @@ typedef NS_OPTIONS(NSUInteger, NSMatchingFlags) {
3262
4126
  @interface NSRegularExpression : NSObject <NSCopying, NSSecureCoding>
3263
4127
  - (NSUInteger)numberOfMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range;
3264
4128
  + (nullable NSRegularExpression *)regularExpressionWithPattern:(NSString *)pattern options:(NSRegularExpressionOptions)options error:(NSError **)error;
4129
+ - (nullable NSTextCheckingResult *)firstMatchInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range;
3265
4130
  - (void)enumerateMatchesInString:(NSString *)string options:(NSMatchingOptions)options range:(NSRange)range usingBlock:(void (NS_NOESCAPE ^)(NSTextCheckingResult * _Nullable result, NSMatchingFlags flags, BOOL *stop))block;
3266
4131
  @end
3267
- typedef struct NS_SWIFT_SENDABLE {
3268
- /// The major release number, such as 10 in version 10.9.3.
3269
- NSInteger majorVersion;
3270
- /// The minor release number, such as 9 in version 10.9.3.
3271
- NSInteger minorVersion;
3272
- /// The update release number, such as 3 in version 10.9.3.
3273
- NSInteger patchVersion;
3274
- } NSOperatingSystemVersion NS_SWIFT_NAME(OperatingSystemVersion);
3275
4132
  @interface NSComparisonPredicate : NSPredicate
3276
4133
  @end
3277
4134
  NS_SWIFT_NAME(LengthFormatter)
@@ -3376,10 +4233,43 @@ NS_ROOT_CLASS
3376
4233
  @interface NSBlockOperation : NSOperation
3377
4234
  + (instancetype)blockOperationWithBlock:(void (NS_SWIFT_SENDABLE ^)(void))block;
3378
4235
  @end
4236
+ NS_ASSUME_NONNULL_BEGIN
4237
+ typedef NS_ENUM(NSUInteger, NSURLCacheStoragePolicy)
4238
+ {
4239
+ NSURLCacheStorageAllowed,
4240
+ NSURLCacheStorageAllowedInMemoryOnly,
4241
+ NSURLCacheStorageNotAllowed,
4242
+ };
4243
+ NS_SWIFT_SENDABLE
4244
+ @interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
4245
+ - (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data;
4246
+ - (instancetype)initWithResponse:(NSURLResponse *)response data:(NSData *)data userInfo:(nullable NSDictionary *)userInfo storagePolicy:(NSURLCacheStoragePolicy)storagePolicy;
4247
+ @property (readonly, copy) NSURLResponse *response;
4248
+ @property (readonly, copy) NSData *data;
4249
+ @property (nullable, readonly, copy) NSDictionary *userInfo;
4250
+ @property (readonly) NSURLCacheStoragePolicy storagePolicy;
4251
+ @end
4252
+ NS_SWIFT_SENDABLE
3379
4253
  @interface NSURLCache : NSObject
3380
- - (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;
3381
4254
  @property (class, strong) NSURLCache *sharedURLCache;
4255
+ - (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity diskPath:(nullable NSString *)path API_DEPRECATED_WITH_REPLACEMENT("initWithMemoryCapacity:diskCapacity:directoryURL:", macos(10.2, 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));
4256
+ - (instancetype)initWithMemoryCapacity:(NSUInteger)memoryCapacity diskCapacity:(NSUInteger)diskCapacity directoryURL:(nullable NSURL *)directoryURL API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
4257
+ - (nullable NSCachedURLResponse *)cachedResponseForRequest:(NSURLRequest *)request;
4258
+ - (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forRequest:(NSURLRequest *)request;
4259
+ - (void)removeCachedResponseForRequest:(NSURLRequest *)request;
4260
+ - (void)removeAllCachedResponses;
4261
+ - (void)removeCachedResponsesSinceDate:(NSDate *)date API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4262
+ @property NSUInteger memoryCapacity;
4263
+ @property NSUInteger diskCapacity;
4264
+ @property (readonly) NSUInteger currentMemoryUsage;
4265
+ @property (readonly) NSUInteger currentDiskUsage;
4266
+ @end
4267
+ @interface NSURLCache (NSURLSessionTaskAdditions)
4268
+ - (void)storeCachedResponse:(NSCachedURLResponse *)cachedResponse forDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4269
+ - (void)getCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask completionHandler:(void (NS_SWIFT_SENDABLE ^) (NSCachedURLResponse * _Nullable cachedResponse))completionHandler API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
4270
+ - (void)removeCachedResponseForDataTask:(NSURLSessionDataTask *)dataTask API_AVAILABLE(macos(10.10), ios(8.0), watchos(2.0), tvos(9.0));
3382
4271
  @end
4272
+ NS_ASSUME_NONNULL_END
3383
4273
  FOUNDATION_EXPORT const float NSURLSessionTaskPriorityDefault __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
3384
4274
  FOUNDATION_EXPORT const float NSURLSessionTaskPriorityLow __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
3385
4275
  FOUNDATION_EXPORT const float NSURLSessionTaskPriorityHigh __attribute__((availability(macos,introduced=10.10), availability(ios,introduced=8.0), availability(watchos,introduced=2.0), availability(tvos,introduced=9.0)));
@@ -3389,15 +4279,19 @@ FOUNDATION_EXPORT NSString * const NSKeyedArchiveRootObjectKey __attribute__((av
3389
4279
  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)));
3390
4280
  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)));
3391
4281
  #define NSURLResponseUnknownLength ((long long)-1)
3392
- @interface NSCachedURLResponse : NSObject <NSSecureCoding, NSCopying>
3393
- @property (readonly, copy) NSURLResponse *response;
3394
- @property (readonly, copy) NSData *data;
3395
- @end
3396
4282
  #if TARGET_OS_IPHONE
3397
4283
  #if __has_include(<CFNetwork/CFNetwork.h>)
3398
4284
  #ifndef __swift__
3399
4285
  // the swift CFNetwork module imports Foundation; keep this edge for C/ObjC.
3400
4286
  #import <CFNetwork/CFNetwork.h>
4287
+ #else
4288
+ // swift sees CFNetworkErrors through Foundation without the CFNetwork module edge. the
4289
+ // copy beside this header is CFNetwork's byte for byte, so it takes CFNetworkDefs' place.
4290
+ #define __CFNETWORKDEFS__
4291
+ #define CFN_EXPORT extern __attribute__((__visibility__("default")))
4292
+ #include <Foundation/CFNetworkErrors.h>
4293
+ #undef CFN_EXPORT
4294
+ #undef __CFNETWORKDEFS__
3401
4295
  #endif
3402
4296
  #endif
3403
4297
  #else