From 7cb97b9fcd0c6644f63b5b461580d32365c8cb84 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 16 Sep 2025 03:37:25 +0200 Subject: [PATCH 01/10] Update to Xcode 26 Beta 1 --- .github/workflows/ci.yml | 2 +- Cargo.lock | 13 + Cargo.toml | 2 + crates/header-translator/configs/libc.toml | 4 + crates/header-translator/configs/skipped.toml | 26 +- crates/header-translator/src/id.rs | 41 +- crates/header-translator/src/rust_type.rs | 10 + crates/header-translator/src/stmt.rs | 5 +- .../header-translator/src/unexposed_attr.rs | 39 +- crates/objc2/src/lib.rs | 12 +- .../objc2/src/topics/FRAMEWORKS_CHANGELOG.md | 3 +- .../src/topics/frameworks_list_unsupported.md | 22 +- crates/test-frameworks/Cargo.toml | 2 +- .../objc2-accessibility/Cargo.toml | 9 + .../objc2-accessory-setup-kit/Cargo.toml | 7 +- framework-crates/objc2-app-kit/Cargo.toml | 28 +- framework-crates/objc2-ar-kit/Cargo.toml | 3 +- .../objc2-ar-kit/translation-config.toml | 2 + .../translation-config.toml | 4 + .../objc2-authentication-services/Cargo.toml | 4 + .../objc2-av-foundation/Cargo.toml | 19 +- .../translation-config.toml | 6 + framework-crates/objc2-av-routing/Cargo.toml | 2 + framework-crates/objc2-avf-audio/Cargo.toml | 2 +- .../objc2-avf-audio/translation-config.toml | 6 + .../objc2-background-assets/Cargo.toml | 38 ++ .../translation-config.toml | 3 + .../objc2-background-tasks/Cargo.toml | 9 +- .../objc2-browser-engine-core/Cargo.toml | 18 + .../translation-config.toml | 3 + .../objc2-browser-engine-kit/Cargo.toml | 12 +- .../translation-config.toml | 1 + framework-crates/objc2-car-play/Cargo.toml | 12 + framework-crates/objc2-cinematic/Cargo.toml | 8 + framework-crates/objc2-cloud-kit/Cargo.toml | 17 + .../objc2-cloud-kit/translation-config.toml | 2 + .../objc2-compositor-services/Cargo.toml | 10 + .../objc2-core-graphics/Cargo.toml | 15 +- .../objc2-core-graphics/src/image.rs | 21 +- .../translation-config.toml | 2 + .../translation-config.toml | 4 + framework-crates/objc2-core-image/Cargo.toml | 1 + .../objc2-core-location/Cargo.modified.toml | 6 + .../objc2-core-location/Cargo.toml | 8 +- .../objc2-core-location/src/lib.rs | 4 + .../objc2-core-location/src/location.rs | 497 ++++++++++++++++++ .../translation-config.toml | 1 + framework-crates/objc2-core-media/Cargo.toml | 5 +- .../objc2-core-telephony/Cargo.toml | 13 +- .../objc2-crypto-token-kit/Cargo.toml | 11 + .../objc2-file-provider/Cargo.toml | 9 + framework-crates/objc2-fs-kit/Cargo.toml | 1 + .../objc2-game-controller/Cargo.toml | 9 + framework-crates/objc2-game-kit/Cargo.toml | 34 ++ framework-crates/objc2-health-kit/Cargo.toml | 36 ++ framework-crates/objc2-map-kit/Cargo.toml | 17 + .../objc2-media-extension/Cargo.toml | 1 + .../objc2-media-player/Cargo.toml | 1 + framework-crates/objc2-messages/Cargo.toml | 1 + framework-crates/objc2-metal-fx/Cargo.toml | 34 ++ framework-crates/objc2-metal-kit/Cargo.toml | 3 +- .../Cargo.toml | 1 + framework-crates/objc2-metal/Cargo.toml | 164 +++++- .../objc2-metal/translation-config.toml | 3 + framework-crates/objc2-metric-kit/Cargo.toml | 6 + .../objc2-nearby-interaction/Cargo.toml | 2 + framework-crates/objc2-pass-kit/Cargo.toml | 5 + .../objc2-pass-kit/translation-config.toml | 4 + framework-crates/objc2-pencil-kit/Cargo.toml | 12 + framework-crates/objc2-quartz-core/Cargo.toml | 3 + .../objc2-screen-capture-kit/Cargo.toml | 9 +- .../Cargo.toml | 23 + .../translation-config.toml | 2 + .../objc2-sensor-kit/Cargo.modified.toml | 6 + framework-crates/objc2-sensor-kit/Cargo.toml | 2 +- .../objc2-sensor-kit/translation-config.toml | 2 + framework-crates/objc2-store-kit/Cargo.toml | 10 + framework-crates/objc2-ui-kit/Cargo.toml | 54 +- .../objc2-ui-kit/src/coordinate_space.rs | 61 +++ framework-crates/objc2-ui-kit/src/geometry.rs | 66 +++ framework-crates/objc2-ui-kit/src/lib.rs | 8 + .../objc2-ui-kit/translation-config.toml | 3 + .../objc2-video-subscriber-account/Cargo.toml | 9 + .../objc2-video-toolbox/Cargo.toml | 15 + .../objc2-video-toolbox/src/lib.rs | 2 + .../objc2-virtualization/Cargo.toml | 2 + .../translation-config.toml | 4 + framework-crates/objc2-web-kit/Cargo.toml | 3 +- generated | 2 +- 89 files changed, 1569 insertions(+), 54 deletions(-) create mode 100644 framework-crates/objc2-core-location/Cargo.modified.toml create mode 100644 framework-crates/objc2-core-location/src/location.rs create mode 100644 framework-crates/objc2-sensor-kit/Cargo.modified.toml create mode 100644 framework-crates/objc2-ui-kit/src/coordinate_space.rs create mode 100644 framework-crates/objc2-ui-kit/src/geometry.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71faa5881..7d9a8f00f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -297,7 +297,7 @@ jobs: - lint env: - DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer + DEVELOPER_DIR: /Applications/Xcode_26.0.app/Contents/Developer steps: - uses: actions/checkout@v4 diff --git a/Cargo.lock b/Cargo.lock index 29059b01f..b31bbdb46 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1031,6 +1031,7 @@ dependencies = [ "dispatch2", "objc2", "objc2-avf-audio", + "objc2-core-audio-types", "objc2-core-foundation", "objc2-core-graphics", "objc2-core-image", @@ -1086,6 +1087,7 @@ dependencies = [ name = "objc2-background-assets" version = "0.3.1" dependencies = [ + "bitflags", "block2", "objc2", "objc2-foundation", @@ -1095,6 +1097,7 @@ dependencies = [ name = "objc2-background-tasks" version = "0.3.1" dependencies = [ + "bitflags", "block2", "dispatch2", "objc2", @@ -1106,6 +1109,9 @@ name = "objc2-browser-engine-core" version = "0.3.1" dependencies = [ "libc", + "objc2", + "objc2-avf-audio", + "objc2-foundation", ] [[package]] @@ -1114,6 +1120,7 @@ version = "0.3.1" dependencies = [ "bitflags", "block2", + "libc", "objc2", "objc2-av-foundation", "objc2-core-foundation", @@ -1214,6 +1221,7 @@ dependencies = [ "bitflags", "block2", "objc2", + "objc2-contacts", "objc2-core-location", "objc2-foundation", ] @@ -2592,6 +2600,7 @@ dependencies = [ "objc2-core-graphics", "objc2-core-media", "objc2-foundation", + "objc2-uniform-type-identifiers", ] [[package]] @@ -2661,8 +2670,11 @@ version = "0.3.1" dependencies = [ "block2", "objc2", + "objc2-av-foundation", "objc2-core-graphics", + "objc2-core-video", "objc2-foundation", + "objc2-video-toolbox", ] [[package]] @@ -2786,6 +2798,7 @@ dependencies = [ "block2", "objc2", "objc2-app-kit", + "objc2-background-assets", "objc2-core-foundation", "objc2-foundation", ] diff --git a/Cargo.toml b/Cargo.toml index 1f4dc0924..919a47159 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,6 +73,8 @@ default.extend-identifiers.IMAGEIO_PNG_FILTER_PAETH = "IMAGEIO_PNG_FILTER_PAETH" # In framework-crates/objc2-io-bluetooth/translation-config.toml default.extend-identifiers.kBluetoothHCIEvnetMaskLinkSupervisionTimeoutChangedEvent = "kBluetoothHCIEvnetMaskLinkSupervisionTimeoutChangedEvent" default.extend-identifiers.kBluetoothHCIEvnetMaskEnhancedFlushCompleteEvent = "kBluetoothHCIEvnetMaskEnhancedFlushCompleteEvent" +# In BackgroundAssets, BA is short of that framework. +default.extend-words.BA = "BA" # Used in Metal, LOD = level of detail default.extend-words.lod = "lod" diff --git a/crates/header-translator/configs/libc.toml b/crates/header-translator/configs/libc.toml index 10794ecbc..08183216d 100644 --- a/crates/header-translator/configs/libc.toml +++ b/crates/header-translator/configs/libc.toml @@ -16,3 +16,7 @@ gnustep = true # HACK: Define `task_port_t` in the using crate (it's a simple alias to `task_t`). external.task_port_t.module = "__builtin__" + +# Redefined by CoreFoundation with a name that makes it hard to see +# that this is `libc::malloc_zone_t`. +struct._malloc_zone_t.renamed = "malloc_zone_t" diff --git a/crates/header-translator/configs/skipped.toml b/crates/header-translator/configs/skipped.toml index 99bad341b..b503a54c1 100644 --- a/crates/header-translator/configs/skipped.toml +++ b/crates/header-translator/configs/skipped.toml @@ -27,6 +27,7 @@ DriverKit = "Uses C++ classes" ActivityKit = "Swift-only" AdAttributionKit = "Swift-only" +AlarmKit = "Mostly Swift-only" AppIntents = "Swift-only" Assignables = "Swift-only" AutomatedDeviceEnrollment = "Swift-only" @@ -39,15 +40,22 @@ CoreTransferable = "Swift-only" CreateML = "Swift-only" CreateMLComponents = "Swift-only" CryptoKit = "Swift-only" +DeclaredAgeRange = "Swift-only" DeveloperToolsSupport = "Swift-only" DeviceActivity = "Swift-only" DockKit = "Swift-only" +EnergyKit = "Swift-only" ExtensionFoundation = "Swift-only" FamilyControls = "Swift-only" FinanceKit = "Swift-only" FinanceKitUI = "Swift-only" +FoundationModels = "Swift-only" +GeoToolbox = "Swift-only" GroupActivities = "Swift-only" +IdentityDocumentServices = "Swift-only" +IdentityDocumentServicesUI = "Swift-only" ImagePlayground = "Swift-only" +ImmersiveMediaSupport = "Swift-only" JournalingSuggestions = "Swift-only" LightweightCodeRequirements = "Swift-only" LiveCommunicationKit = "Swift-only" @@ -59,9 +67,12 @@ ManagedSettingsUI = "Swift-only" MarketplaceKit = "Swift-only" MatterSupport = "Swift-only" MusicKit = "Swift-only" +PaperKit = "Swift-only" +PermissionKit = "Swift-only" ProximityReader = "Swift-only" RealityFoundation = "Swift-only" RealityKit = "Swift-only" +RelevanceKit = "Swift-only" RoomPlan = "Swift-only" SecureElementCredential = "Swift-only" SwiftData = "Swift-only" @@ -69,13 +80,18 @@ SwiftUI = "Swift-only" SwiftUICore = "Swift-only" TabletopKit = "Swift-only" TabularData = "Swift-only" +TelephonyMessagingKit = "Swift-only" Testing = "Swift-only" TipKit = "Swift-only" Translation = "Swift-only" TranslationUIProvider = "Swift-only" +VisionEntitlementServices = "Mostly Swift-only" VisionKit = "Swift-only" +VisualIntelligence = "Swift-only" WeatherKit = "Swift-only" WidgetKit = "Mostly Swift-only" +WiFiAware = "Swift-only" +WirelessInsights = "Swift-only" WorkoutKit = "Swift-only" AppleScriptKit = "Basically empty nowadays" # requires !swift @@ -91,6 +107,7 @@ QTKit = "No headers present in Xcode's SDK" StickerFoundation = "Basically empty" StickerKit = "Basically empty" System = "Deprecated wrapper over libSystem.dylib" +MetalPerformancePrimitives = "Header-only framework used in Metal shaders" # Deprecated before macOS 10.12 (Rust's minimum supported macOS version) AudioVideoBridging = "Deprecated, use AVKit/AVFoundation instead (maybe?)" @@ -120,11 +137,16 @@ CoreMIDIServer = "Very deprecated" InterfaceBuilderKit = "TODO. Developer-only" XcodeKit = "TODO. Developer-only" StoreKitTest = "TODO. Developer-only" -LiveExecutionResultsLogger = "Removed in Xcode 26" -AGL = "Removed in Xcode 26" Network = "TODO, see [#646](https://github.com/madsmtm/objc2/issues/646)" DeviceDiscoveryUI = "Needs Network first" BrowserKit = "TODO" SecurityUI = "TODO" +GameSave = "TODO" +TouchControls = "TODO" + +MeshNetFramework = "Weirdly incomplete" + +# LiveExecutionResultsLogger = "Removed in Xcode 26" +# AGL = "Removed in Xcode 26" diff --git a/crates/header-translator/src/id.rs b/crates/header-translator/src/id.rs index 33a1c449d..7e007536c 100644 --- a/crates/header-translator/src/id.rs +++ b/crates/header-translator/src/id.rs @@ -69,6 +69,22 @@ pub struct Location { impl Location { fn new(module_path: impl Into>) -> Self { let module_path = module_path.into(); + + // We don't care about the difference between the different + // DarwinFoundation modules (for now at least). + if let Some(rest) = module_path.strip_prefix("DarwinFoundation.") { + return Self::new(rest); + } + if let Some(rest) = module_path.strip_prefix("_DarwinFoundation1.") { + return Self::new(rest); + } + if let Some(rest) = module_path.strip_prefix("_DarwinFoundation2.") { + return Self::new(rest); + } + if let Some(rest) = module_path.strip_prefix("_DarwinFoundation3.") { + return Self::new(rest); + } + let module_path = match &*module_path { // Remove submodules for Objective-C. name if name.starts_with("ObjectiveC") => "ObjectiveC".into(), @@ -83,7 +99,9 @@ impl Location { // Various macros name if name.starts_with("os_availability") => "__builtin__".into(), - "DarwinFoundation.cdefs" => "__builtin__".into(), + name if name.starts_with("_AvailabilityInternal") => "__builtin__".into(), + name if name.starts_with("availability") => "__builtin__".into(), + "cdefs" => "__builtin__".into(), "Darwin.libkern.OSByteOrder" => "__builtin__".into(), "TargetConditionals" => "__builtin__".into(), "Darwin.AssertMacros" => "__builtin__".into(), @@ -108,7 +126,7 @@ impl Location { "_Builtin_stdint" | "_stdint" => "__builtin__".into(), name if name.starts_with("_Builtin_stddef") => "__builtin__".into(), // Implementation of the above - "DarwinFoundation.types.machine_types" => "__builtin__".into(), + name if name.starts_with("types.machine_types") => "__builtin__".into(), // UINT_MAX, FLT_MIN, DBL_MAX, etc. // Handled manually in `expr.rs`. "_Builtin_limits" => "__builtin__".into(), @@ -132,8 +150,8 @@ impl Location { name if name.starts_with("sys_types") => "__libc__".into(), name if name.starts_with("Darwin.POSIX") => "__libc__".into(), name if name.starts_with("_signal") => "__libc__".into(), - "DarwinFoundation.types.sys_types" => "__libc__".into(), - "DarwinFoundation.qos" => "__libc__".into(), + "types.sys_types" => "__libc__".into(), + "qos" => "__libc__".into(), "_stdio" => "__libc__".into(), "_time.timespec" => "__libc__".into(), "_fenv" => "__libc__".into(), @@ -149,9 +167,12 @@ impl Location { "ptrauth" => "__libc__".into(), "Darwin.uuid" => "__libc__".into(), "unistd" => "__libc__".into(), + "Darwin.malloc" => "__libc__".into(), + "_stdlib.malloc.malloc_type" => "__libc__".into(), // Will be moved to the `mach2` crate in `libc` v1.0 name if name.starts_with("Darwin.Mach") => "__libc__".into(), + "mach.port.mach_port_t" => "__libc__".into(), "mach.mach_port_t" => "__libc__".into(), "_mach_port_t" => "__libc__".into(), @@ -168,6 +189,18 @@ impl Location { // available without it, which can be quite confusing. "CoreFoundation.CFBase" => "CoreFoundation".into(), + // UIUtilities "subframework". It doesn't seem to be intentionally + // exposed. It's small enough that we'll just inline it into + // UIKit for now (which is where it was extracted from anyhow). + "UIUtilities.UIGeometry" => "UIKit.UIGeometry".into(), + "UIUtilities.UICoordinateSpace" => "UIKit.UIView".into(), + "UIUtilities.UIDefines" => "UIKit.UIKitDefines".into(), + + // Similarly, _LocationEssentials was extracted from CoreLocation. + "_LocationEssentials" => "CoreLocation".into(), + "_LocationEssentials.CLEssentionsAvailability" => "CoreLocation.CLAvailability".into(), + "_LocationEssentials.CLLocationEssentials" => "CoreLocation.CLLocation".into(), + _ => module_path, }; diff --git a/crates/header-translator/src/rust_type.rs b/crates/header-translator/src/rust_type.rs index 6581b716c..f6d34b681 100644 --- a/crates/header-translator/src/rust_type.rs +++ b/crates/header-translator/src/rust_type.rs @@ -161,6 +161,10 @@ impl AttributeParser<'_, '_> { fn nullable_result(&mut self, position: ParsePosition) -> bool { self.strip("_Nullable_result", position) } + + fn sending(&mut self, position: ParsePosition) -> bool { + self.strip("__attribute__((swift_attr(\"sending\")))", position) + } } impl Drop for AttributeParser<'_, '_> { @@ -1456,6 +1460,8 @@ impl Ty { | "MIDISysexSendRequestUMP" | "MIDIDriverInterface" | "cssm_list_element" + | "malloc_zone_t" + | "_malloc_zone_t" ) ) { // Fake fields, we'll have to define it ourselves @@ -1674,6 +1680,10 @@ impl Ty { parser.set_fn_ptr(); } + // TODO: Use this + // (Swift's @Sendable = Send + Sync, Swift's sending = Send). + let _sending = parser.sending(ParsePosition::Suffix); + let is_const = ty.is_const_qualified() || pointee.is_const_qualified(); let nullability = if let Some(nullability) = unexposed_nullability { nullability diff --git a/crates/header-translator/src/stmt.rs b/crates/header-translator/src/stmt.rs index 494da9973..1d5af9dab 100644 --- a/crates/header-translator/src/stmt.rs +++ b/crates/header-translator/src/stmt.rs @@ -352,7 +352,10 @@ fn verify_objc_decl(entity: &Entity<'_>, _context: &Context<'_>) { (EntityKind::UnexposedAttr, _) => { // Parsed in parse_attributes } - (_, parent_kind) => error!(?parent_kind, "unknown in parent"), + (EntityKind::AnnotateAttr, _) if entity.get_name().unwrap() == "main-thread-only" => { + // Already parsed via. UnexposedAttr. + } + (_, parent_kind) => error!(?entity, ?parent_kind, "unknown in parent"), } }); } diff --git a/crates/header-translator/src/unexposed_attr.rs b/crates/header-translator/src/unexposed_attr.rs index 0a0ec4740..effb536c1 100644 --- a/crates/header-translator/src/unexposed_attr.rs +++ b/crates/header-translator/src/unexposed_attr.rs @@ -66,6 +66,9 @@ impl UnexposedAttr { | "CF_TYPED_EXTENSIBLE_ENUM" | "NS_EXTENSIBLE_STRING_ENUM" | "CF_EXTENSIBLE_STRING_ENUM" => Some(Self::TypedExtensibleEnum), + // FIXME: Attribute used directly in CoreGraphics, we really need + // to parse and check the contents of it here. + "swift_wrapper" => None, "NS_SWIFT_BRIDGED_TYPEDEF" | "CF_SWIFT_BRIDGED_TYPEDEF" => Some(Self::BridgedTypedef), "CF_IMPLICIT_BRIDGING_ENABLED" => Some(Self::BridgedImplicit), "CF_BRIDGED_TYPE" @@ -106,18 +109,29 @@ impl UnexposedAttr { // Nullability attributes s if s.starts_with("DISPATCH_NONNULL") => None, s if s.starts_with("XPC_NONNULL") => None, - "NS_SWIFT_SENDABLE" | "AS_SWIFT_SENDABLE" | "CM_SWIFT_SENDABLE" - | "CT_SWIFT_SENDABLE" | "CV_SWIFT_SENDABLE" | "XCT_SWIFT_SENDABLE" => { - Some(Self::Sendable) - } - "NS_SWIFT_NONSENDABLE" | "CM_SWIFT_NONSENDABLE" | "CV_SWIFT_NONSENDABLE" => { - Some(Self::NonSendable) + "NS_SWIFT_SENDABLE" + | "AS_SWIFT_SENDABLE" + | "CM_SWIFT_SENDABLE" + | "CT_SWIFT_SENDABLE" + | "CV_SWIFT_SENDABLE" + | "XCT_SWIFT_SENDABLE" + | "SEC_SWIFT_SENDABLE" + | "IOSFC_SWIFT_SENDABLE" => Some(Self::Sendable), + "NS_SWIFT_NONSENDABLE" + | "CM_SWIFT_NONSENDABLE" + | "CV_SWIFT_NONSENDABLE" + | "IOSFC_SWIFT_NONSENDABLE" => Some(Self::NonSendable), + // TODO + "NS_SWIFT_SENDING" | "CM_SWIFT_SENDING" => None, + "CM_SWIFT_SENDING_RETAINED_RESULT" | "CM_SWIFT_SENDING_RETAINED_PARAMETER" => { + Some(Self::ReturnsRetained) } // The main and UI actor is effectively the same on Apple platforms. "NS_SWIFT_UI_ACTOR" | "WK_SWIFT_UI_ACTOR" | "XCT_SWIFT_MAIN_ACTOR" - | "XCUI_SWIFT_MAIN_ACTOR" => Some(Self::UIActor), + | "XCUI_SWIFT_MAIN_ACTOR" + | "CARPLAY_TEMPLATE_UI_ACTOR" => Some(Self::UIActor), "NS_SWIFT_NONISOLATED" | "UIKIT_SWIFT_ACTOR_INDEPENDENT" => Some(Self::NonIsolated), // TODO "CF_FORMAT_ARGUMENT" | "CF_FORMAT_FUNCTION" | "NS_FORMAT_FUNCTION" @@ -181,6 +195,8 @@ impl UnexposedAttr { | "CF_SWIFT_UNAVAILABLE" | "CG_AVAILABLE_BUT_DEPRECATED" | "CG_AVAILABLE_STARTING" + | "CG_SOFT_DEPRECATED_WITH_REPLACEMENT" + | "CG_ENUM_SOFT_DEPRECATED_WITH_REPLACEMENT" | "CI_GL_DEPRECATED" | "CI_GL_DEPRECATED_IOS" | "CI_GL_DEPRECATED_MAC" @@ -323,8 +339,12 @@ impl UnexposedAttr { | "CB_CM_API_AVAILABLE" | "CF_AUTOMATED_REFCOUNT_UNAVAILABLE" | "CG_OBSOLETE" - | "CS_UNAVAILABLE_EMBEDDED" + | "CK_SHARE_ACCESS_REQUESTER_AVAILABILITY" + | "CK_SHARE_BLOCKED_IDENTITY_AVAILABILITY" + | "CKSHARE_REQUEST_ACCESS_INTERFACES_AVAILABILITY" + | "CM_VISION_OS_AVAILABLE" | "CS_TVOS_UNAVAILABLE" + | "CS_UNAVAILABLE_EMBEDDED" | "CSSM_DEPRECATED" | "deprecated" | "DEPRECATED_ATTRIBUTE" @@ -398,7 +418,8 @@ impl UnexposedAttr { | "DISPATCH_REFINED_FOR_SWIFT" | "NS_REFINED_FOR_SWIFT" | "AR_REFINED_FOR_SWIFT" - | "NS_SWIFT_DISABLE_ASYNC" => None, + | "NS_SWIFT_DISABLE_ASYNC" + | "CP_STRUCT_REF" => None, // Possibly interesting? "DISPATCH_COLD" => None, "DISPATCH_MALLOC" => None, diff --git a/crates/objc2/src/lib.rs b/crates/objc2/src/lib.rs index f685b601d..5d59f16c1 100644 --- a/crates/objc2/src/lib.rs +++ b/crates/objc2/src/lib.rs @@ -65,17 +65,17 @@ //! //! ## Supported operating systems //! -//! - macOS: `10.12-15.5` -//! - iOS: `10.0-18.5` (including iPadOS and Mac Catalyst) -//! - tvOS: `10.0-18.5` -//! - watchOS: `5.0-11.5` -//! - visionOS: `1.0-2.5` +//! - macOS: `10.12-26.0` +//! - iOS: `10.0-26.0` (including iPadOS and Mac Catalyst) +//! - tvOS: `10.0-26.0` +//! - watchOS: `5.0-26.0` +//! - visionOS: `1.0-26.0` //! //! The minimum versions are the same as those supported by `rustc`. Higher //! versions will also work, but the framework crates will not have bindings //! available for newer APIs. //! -//! The framework bindings are generated from the SDKs in Xcode 16.4. The +//! The framework bindings are generated from the SDKs in Xcode 26.0. The //! Xcode version are updated usually within a week of [GitHub Actions] //! supporting the new Xcode version, and we try to schedule crate releases //! such that align fairly closely with Xcode updates. We only support stable diff --git a/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md b/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md index ddaa3ea0a..ab4800b8c 100644 --- a/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md +++ b/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md @@ -27,10 +27,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `XCUIAutomation` / `objc2-xc-ui-automation`. ### Changed -* Updated SDK from Xcode 16.3 to 16.4. +* Updated SDK from Xcode 16.3 to 26.0. View the release notes to learn more details: - [16.4](https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes) + - [26.0](https://developer.apple.com/documentation/xcode-release-notes/xcode-26-release-notes) Breaking changes are noted elsewhere in this changelog entry. * **BREAKING**: The reply block in `FSVolumeRenameOperations::setVolumeName_replyHandler` now diff --git a/crates/objc2/src/topics/frameworks_list_unsupported.md b/crates/objc2/src/topics/frameworks_list_unsupported.md index 4a3fd9733..dd250fcef 100644 --- a/crates/objc2/src/topics/frameworks_list_unsupported.md +++ b/crates/objc2/src/topics/frameworks_list_unsupported.md @@ -1,11 +1,11 @@ | Framework | Why is this unsupported? | | --- | --- | -| `AGL` | Removed in Xcode 26. | | `Accelerate` | Very C-centric, hard for us to map. | | `ActivityKit` | Swift-only. | | `AdAttributionKit` | Swift-only. | | `AddressBook` | Deprecated, use Contacts instead. | | `AddressBookUI` | Deprecated, use Contacts instead. | +| `AlarmKit` | Mostly Swift-only. | | `AppIntents` | Swift-only. | | `AppleScriptKit` | Basically empty nowadays. | | `AppleScriptObjC` | Basically empty nowadays. | @@ -29,6 +29,7 @@ | `CreateMLComponents` | Swift-only. | | `CryptoKit` | Swift-only. | | `DVDPlayback` | Deprecated, use AVKit/AVFoundation instead. | +| `DeclaredAgeRange` | Swift-only. | | `DeveloperToolsSupport` | Swift-only. | | `DeviceActivity` | Swift-only. | | `DeviceDiscoveryUI` | Needs Network first. | @@ -37,17 +38,24 @@ | `DiscRecordingUI` | Deprecated, use AVKit/AVFoundation instead. | | `DockKit` | Swift-only. | | `DriverKit` | Uses C++ classes. | +| `EnergyKit` | Swift-only. | | `ExtensionFoundation` | Swift-only. | | `FamilyControls` | Swift-only. | | `FinanceKit` | Swift-only. | | `FinanceKitUI` | Swift-only. | | `ForceFeedback` | Very C-centric and old. | +| `FoundationModels` | Swift-only. | | `GLUT` | Apple's redistribution of GLUT headers, better served by a different crate. | | `GSS` | Very C-centric and old. | +| `GameSave` | TODO. | +| `GeoToolbox` | Swift-only. | | `GroupActivities` | Swift-only. | | `Hypervisor` | Very low-level, consider crates like `applevisor` instead. | | `ICADevices` | Deprecated, use ImageCaptureCore instead. | +| `IdentityDocumentServices` | Swift-only. | +| `IdentityDocumentServicesUI` | Swift-only. | | `ImagePlayground` | Swift-only. | +| `ImmersiveMediaSupport` | Swift-only. | | `InstallerPlugins` | Deprecated. | | `InstantMessage` | Deprecated in macOS 10.9. | | `InterfaceBuilderKit` | TODO. Developer-only. | @@ -60,7 +68,6 @@ | `LDAP` | Basically empty. | | `LightweightCodeRequirements` | Swift-only. | | `LiveCommunicationKit` | Swift-only. | -| `LiveExecutionResultsLogger` | Removed in Xcode 26. | | `LockedCameraCapture` | Swift-only. | | `ManagedApp` | Swift-only. | | `ManagedAppDistribution` | Swift-only. | @@ -70,7 +77,9 @@ | `Matter` | Mostly available [here](https://github.com/project-chip/connectedhomeip). | | `MatterSupport` | Swift-only. | | `MediaLibrary` | Deprecated, use PhotoKit instead. | +| `MeshNetFramework` | Weirdly incomplete. | | `Message` | Basically empty. | +| `MetalPerformancePrimitives` | Header-only framework used in Metal shaders. | | `MobileCoreServices` | Deprecated, use CoreServices + UniformTypeIdentifiers instead. | | `MusicKit` | Swift-only. | | `NetFS` | Deprecated, use macFUSE or FSKit instead (probably). | @@ -78,12 +87,15 @@ | `OpenAL` | Very C-centric, use newer Audio frameworks instead. | | `OpenCL` | Very C-centric and old. | | `PCSC` | Too low-level, consider crates like `pcsc` instead. | +| `PaperKit` | Swift-only. | +| `PermissionKit` | Swift-only. | | `ProximityReader` | Swift-only. | | `ProximityReaderStub` | Basically empty. | | `Python3` | Better served by dedicated crates like `pyo3-ffi`. | | `QTKit` | No headers present in Xcode's SDK. | | `RealityFoundation` | Swift-only. | | `RealityKit` | Swift-only. | +| `RelevanceKit` | Swift-only. | | `RoomPlan` | Swift-only. | | `Ruby` | Very C-centric and old. | | `SecureElementCredential` | Swift-only. | @@ -100,16 +112,22 @@ | `TabletopKit` | Swift-only. | | `TabularData` | Swift-only. | | `Tcl` | Very C-centric and old. | +| `TelephonyMessagingKit` | Swift-only. | | `Testing` | Swift-only. | | `TipKit` | Swift-only. | | `Tk` | Very C-centric and old. | +| `TouchControls` | TODO. | | `Translation` | Swift-only. | | `TranslationUIProvider` | Swift-only. | | `Twitter` | Deprecated, use Social instead. | | `VideoDecodeAcceleration` | Very C-centric and old. | +| `VisionEntitlementServices` | Mostly Swift-only. | | `VisionKit` | Swift-only. | +| `VisualIntelligence` | Swift-only. | | `WeatherKit` | Swift-only. | +| `WiFiAware` | Swift-only. | | `WidgetKit` | Mostly Swift-only. | +| `WirelessInsights` | Swift-only. | | `WorkoutKit` | Swift-only. | | `XcodeKit` | TODO. Developer-only. | | `iAd` | Disabled on server side, use AdServices instead. | diff --git a/crates/test-frameworks/Cargo.toml b/crates/test-frameworks/Cargo.toml index 328cf9003..51f5c077b 100644 --- a/crates/test-frameworks/Cargo.toml +++ b/crates/test-frameworks/Cargo.toml @@ -292,7 +292,7 @@ objc2-social = ["dep:objc2-social"] objc2-sound-analysis = ["dep:objc2-sound-analysis"] objc2-speech = ["dep:objc2-speech"] objc2-sprite-kit = ["dep:objc2-sprite-kit", "objc2-sprite-kit?/objc2-gl-kit"] -objc2-store-kit = ["dep:objc2-store-kit"] +objc2-store-kit = ["dep:objc2-store-kit", "objc2-store-kit?/objc2-background-assets"] objc2-symbols = ["dep:objc2-symbols"] objc2-system-configuration = ["dep:objc2-system-configuration"] objc2-system-extensions = ["dep:objc2-system-extensions"] diff --git a/framework-crates/objc2-accessibility/Cargo.toml b/framework-crates/objc2-accessibility/Cargo.toml index 232e7ff10..df2ce6e91 100644 --- a/framework-crates/objc2-accessibility/Cargo.toml +++ b/framework-crates/objc2-accessibility/Cargo.toml @@ -48,6 +48,7 @@ default = [ "std", "AXAudiograph", "AXBrailleMap", + "AXBrailleTranslator", "AXColorUtilities", "AXCustomContent", "AXFeatureOverrideSessionManager", @@ -77,6 +78,14 @@ AXAudiograph = [ "objc2-foundation/NSValue", ] AXBrailleMap = ["objc2-foundation/NSObject"] +AXBrailleTranslator = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSLocale", + "objc2-foundation/NSObject", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", + "objc2-foundation/NSValue", +] AXColorUtilities = ["objc2-foundation/NSString"] AXCustomContent = [ "objc2-foundation/NSArray", diff --git a/framework-crates/objc2-accessory-setup-kit/Cargo.toml b/framework-crates/objc2-accessory-setup-kit/Cargo.toml index f4fa36061..c1a38b2ef 100644 --- a/framework-crates/objc2-accessory-setup-kit/Cargo.toml +++ b/framework-crates/objc2-accessory-setup-kit/Cargo.toml @@ -47,6 +47,7 @@ default = [ "ASDiscoveryDescriptor", "ASErrors", "ASPickerDisplayItem", + "ASPickerDisplaySettings", "bitflags", "block2", "dispatch2", @@ -76,7 +77,10 @@ ASAccessorySettings = [ "objc2-foundation/NSData", "objc2-foundation/NSString", ] -ASCommon = [] +ASCommon = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] ASDiscoveryDescriptor = [ "objc2-foundation/NSData", "objc2-foundation/NSString", @@ -90,3 +94,4 @@ ASPickerDisplayItem = [ "objc2-foundation/NSString", "objc2-foundation/NSUUID", ] +ASPickerDisplaySettings = ["objc2-foundation/NSDate"] diff --git a/framework-crates/objc2-app-kit/Cargo.toml b/framework-crates/objc2-app-kit/Cargo.toml index ba3250cb4..fd696f871 100644 --- a/framework-crates/objc2-app-kit/Cargo.toml +++ b/framework-crates/objc2-app-kit/Cargo.toml @@ -47,6 +47,7 @@ objc2-core-graphics = { workspace = true, optional = true, features = [ "CGColor", "CGColorSpace", "CGContext", + "CGDirectDisplay", "CGEventTypes", "CGFont", "CGImage", @@ -121,6 +122,7 @@ default = [ "NSApplicationScripting", "NSArrayController", "NSAttributedString", + "NSBackgroundExtensionView", "NSBezierPath", "NSBitmapImageRep", "NSBox", @@ -187,6 +189,7 @@ default = [ "NSForm", "NSFormCell", "NSGestureRecognizer", + "NSGlassEffectView", "NSGlyphGenerator", "NSGlyphInfo", "NSGradient", @@ -299,6 +302,7 @@ default = [ "NSSplitView", "NSSplitViewController", "NSSplitViewItem", + "NSSplitViewItemAccessoryViewController", "NSStackView", "NSStatusBar", "NSStatusBarButton", @@ -548,6 +552,12 @@ NSAttributedString = [ "objc2-foundation/NSString", "objc2-foundation/NSURL", ] +NSBackgroundExtensionView = [ + "objc2-foundation/NSCoder", + "objc2-foundation/NSGeometry", + "objc2-foundation/NSObject", + "objc2-foundation/objc2-core-foundation", +] NSBezierPath = [ "objc2-foundation/NSAffineTransform", "objc2-foundation/NSGeometry", @@ -1028,6 +1038,13 @@ NSFormCell = [ "objc2-foundation/objc2-core-foundation", ] NSGestureRecognizer = [ + "objc2-foundation/NSCoder", + "objc2-foundation/NSGeometry", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/objc2-core-foundation", +] +NSGlassEffectView = [ "objc2-foundation/NSCoder", "objc2-foundation/NSGeometry", "objc2-foundation/NSObject", @@ -1770,7 +1787,16 @@ NSSplitViewController = [ "objc2-foundation/NSString", "objc2-foundation/objc2-core-foundation", ] -NSSplitViewItem = ["objc2-foundation/NSObject"] +NSSplitViewItem = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", +] +NSSplitViewItemAccessoryViewController = [ + "objc2-foundation/NSBundle", + "objc2-foundation/NSCoder", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] NSStackView = [ "objc2-foundation/NSArray", "objc2-foundation/NSCoder", diff --git a/framework-crates/objc2-ar-kit/Cargo.toml b/framework-crates/objc2-ar-kit/Cargo.toml index 80e11193d..d5ad7b287 100644 --- a/framework-crates/objc2-ar-kit/Cargo.toml +++ b/framework-crates/objc2-ar-kit/Cargo.toml @@ -22,6 +22,7 @@ dispatch2 = { workspace = true, optional = true, features = ["alloc"] } objc2 = { workspace = true, optional = true, features = ["std"] } objc2-av-foundation = { workspace = true, optional = true, features = [ "AVCaptureDevice", + "AVCapturePhotoOutput", "AVDepthData", ] } objc2-core-foundation = { workspace = true, optional = true, features = ["CFCGTypes"] } @@ -125,7 +126,6 @@ default = [ "ARPlaneDetectionTypes", "ARPlaneGeometry", "ARPointCloud", - "ARQuickLookPreviewItem", "ARRaycastQuery", "ARRaycastResult", "ARReferenceImage", @@ -220,7 +220,6 @@ ARPlaneAnchor = [] ARPlaneDetectionTypes = ["bitflags"] ARPlaneGeometry = [] ARPointCloud = [] -ARQuickLookPreviewItem = [] ARRaycastQuery = [] ARRaycastResult = [] ARReferenceImage = [] diff --git a/framework-crates/objc2-ar-kit/translation-config.toml b/framework-crates/objc2-ar-kit/translation-config.toml index 0055c7c47..d3351ebb3 100644 --- a/framework-crates/objc2-ar-kit/translation-config.toml +++ b/framework-crates/objc2-ar-kit/translation-config.toml @@ -5,6 +5,8 @@ maccatalyst = "14.0" ios = "11.0" visionos = "1.0" +external.UIInterfaceOrientation.module = "UIKit.UIOrientation" + # Needs QLPreviewItem from QuickLook class.ARQuickLookPreviewItem.skipped-protocols = ["QLPreviewItem"] diff --git a/framework-crates/objc2-audio-toolbox/translation-config.toml b/framework-crates/objc2-audio-toolbox/translation-config.toml index da596d57f..1e2ba1ac1 100644 --- a/framework-crates/objc2-audio-toolbox/translation-config.toml +++ b/framework-crates/objc2-audio-toolbox/translation-config.toml @@ -138,3 +138,7 @@ fn.AUMIDIControllerHandleMIDI.skipped = true fn.AUMIDIControllerConnectSource.skipped = true fn.AUMIDIControllerDisconnectSource.skipped = true fn.AUMIDIControllerExportXMLNames.skipped = true + +# Needs CASpatialAudioExperience, which is not available on macOS (where header-translator runs). +class.AUAudioUnit.methods.intendedSpatialExperience.skipped = true +class.AUAudioUnit.methods."setIntendedSpatialExperience:".skipped = true diff --git a/framework-crates/objc2-authentication-services/Cargo.toml b/framework-crates/objc2-authentication-services/Cargo.toml index bf980b446..b983400d2 100644 --- a/framework-crates/objc2-authentication-services/Cargo.toml +++ b/framework-crates/objc2-authentication-services/Cargo.toml @@ -304,6 +304,8 @@ ASAuthorizationProviderExtensionLoginManager = [ ASAuthorizationProviderExtensionRegistrationHandler = [ "bitflags", "objc2-foundation/NSArray", + "objc2-foundation/NSData", + "objc2-foundation/NSDictionary", "objc2-foundation/NSString", "objc2-foundation/NSValue", ] @@ -433,8 +435,10 @@ ASCredentialProviderViewController = [ "objc2-foundation/NSArray", "objc2-foundation/NSBundle", "objc2-foundation/NSCoder", + "objc2-foundation/NSData", "objc2-foundation/NSExtensionContext", "objc2-foundation/NSObject", + "objc2-foundation/NSString", ] ASCredentialRequest = ["objc2-foundation/NSObject"] ASCredentialServiceIdentifier = [ diff --git a/framework-crates/objc2-av-foundation/Cargo.toml b/framework-crates/objc2-av-foundation/Cargo.toml index 3b428354b..8e25f4f31 100644 --- a/framework-crates/objc2-av-foundation/Cargo.toml +++ b/framework-crates/objc2-av-foundation/Cargo.toml @@ -25,6 +25,10 @@ dispatch2 = { workspace = true, optional = true, features = [ ] } objc2 = { workspace = true, features = ["std"] } objc2-avf-audio = { workspace = true, optional = true, features = ["AVAudioSessionRoute"] } +objc2-core-audio-types = { workspace = true, optional = true, features = [ + "CoreAudioBaseTypes", + "objc2", +] } objc2-core-foundation = { workspace = true, optional = true, features = [ "CFCGTypes", "CFDate", @@ -184,6 +188,7 @@ default = [ "AVCaptureSession", "AVCaptureSessionPreset", "AVCaptureSlider", + "AVCaptureSpatialAudioMetadataSampleGenerator", "AVCaptureStillImageOutput", "AVCaptureSystemExposureBiasSlider", "AVCaptureSystemPressure", @@ -214,6 +219,7 @@ default = [ "AVMovie", "AVMovieTrack", "AVOutputSettingsAssistant", + "AVPlaybackCoordinationMedium", "AVPlaybackCoordinator", "AVPlayer", "AVPlayerInterstitialEventController", @@ -251,6 +257,7 @@ default = [ "block2", "dispatch2", "objc2-avf-audio", + "objc2-core-audio-types", "objc2-core-foundation", "objc2-core-graphics", "objc2-core-image", @@ -265,6 +272,7 @@ bitflags = ["dep:bitflags"] block2 = ["dep:block2"] dispatch2 = ["dep:dispatch2"] objc2-avf-audio = ["dep:objc2-avf-audio"] +objc2-core-audio-types = ["dep:objc2-core-audio-types"] objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-core-graphics = ["dep:objc2-core-graphics"] objc2-core-image = ["dep:objc2-core-image"] @@ -289,7 +297,11 @@ AVAsset = [ "objc2-foundation/NSURL", "objc2-foundation/NSUUID", ] -AVAssetCache = ["objc2-foundation/NSArray"] +AVAssetCache = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSString", +] AVAssetDownloadStorageManager = [ "objc2-foundation/NSDate", "objc2-foundation/NSObject", @@ -371,6 +383,7 @@ AVAssetVariant = [ "objc2-foundation/NSObject", "objc2-foundation/NSPredicate", "objc2-foundation/NSString", + "objc2-foundation/NSURL", "objc2-foundation/NSValue", ] AVAssetWriter = [ @@ -537,6 +550,7 @@ AVCaptureSlider = [ "objc2-foundation/NSString", "objc2-foundation/NSValue", ] +AVCaptureSpatialAudioMetadataSampleGenerator = [] AVCaptureStillImageOutput = [ "objc2-foundation/NSArray", "objc2-foundation/NSData", @@ -677,10 +691,12 @@ AVOutputSettingsAssistant = [ "objc2-foundation/NSDictionary", "objc2-foundation/NSString", ] +AVPlaybackCoordinationMedium = ["objc2-foundation/NSArray"] AVPlaybackCoordinator = [ "bitflags", "objc2-foundation/NSArray", "objc2-foundation/NSDate", + "objc2-foundation/NSError", "objc2-foundation/NSNotification", "objc2-foundation/NSString", "objc2-foundation/NSUUID", @@ -699,6 +715,7 @@ AVPlayer = [ AVPlayerInterstitialEventController = [ "bitflags", "objc2-foundation/NSArray", + "objc2-foundation/NSBundle", "objc2-foundation/NSDate", "objc2-foundation/NSDictionary", "objc2-foundation/NSNotification", diff --git a/framework-crates/objc2-av-foundation/translation-config.toml b/framework-crates/objc2-av-foundation/translation-config.toml index e2d0e8df6..265257789 100644 --- a/framework-crates/objc2-av-foundation/translation-config.toml +++ b/framework-crates/objc2-av-foundation/translation-config.toml @@ -16,6 +16,12 @@ external.CIBarcodeDescriptor.module = "CoreImage.CIBarcodeDescriptor" # Only available on iOS class.AVAsset.methods.preferredDisplayCriteria.skipped = true +# Needs CASpatialAudioExperience, which is not available on macOS (where header-translator runs). +class.AVPlayer.methods.intendedSpatialAudioExperience.skipped = true +class.AVPlayer.methods."setIntendedSpatialAudioExperience:".skipped = true +class.AVSampleBufferRenderSynchronizer.methods.intendedSpatialAudioExperience.skipped = true +class.AVSampleBufferRenderSynchronizer.methods."setIntendedSpatialAudioExperience:".skipped = true + # Unclear error return protocol.AVAsynchronousKeyValueLoading.methods."statusOfValueForKey:error:".skipped = true class.AVMetadataItem.methods."statusOfValueForKey:error:".skipped = true diff --git a/framework-crates/objc2-av-routing/Cargo.toml b/framework-crates/objc2-av-routing/Cargo.toml index 95be6c4f4..956a0a1fc 100644 --- a/framework-crates/objc2-av-routing/Cargo.toml +++ b/framework-crates/objc2-av-routing/Cargo.toml @@ -40,6 +40,7 @@ default = [ "AVCustomRoutingController", "AVCustomRoutingEvent", "AVRoutingDefines", + "AVRoutingPlaybackArbiter", "block2", "objc2-uniform-type-identifiers", ] @@ -58,3 +59,4 @@ AVCustomRoutingController = [ ] AVCustomRoutingEvent = [] AVRoutingDefines = [] +AVRoutingPlaybackArbiter = [] diff --git a/framework-crates/objc2-avf-audio/Cargo.toml b/framework-crates/objc2-avf-audio/Cargo.toml index 7f8716ec9..412926aa5 100644 --- a/framework-crates/objc2-avf-audio/Cargo.toml +++ b/framework-crates/objc2-avf-audio/Cargo.toml @@ -201,7 +201,6 @@ AVAudioSession = [ "objc2-foundation/NSArray", "objc2-foundation/NSDate", "objc2-foundation/NSError", - "objc2-foundation/NSNotification", "objc2-foundation/NSString", ] AVAudioSessionDeprecated = ["objc2-foundation/NSError"] @@ -213,6 +212,7 @@ AVAudioSessionRoute = [ ] AVAudioSessionTypes = [ "bitflags", + "objc2-foundation/NSNotification", "objc2-foundation/NSString", ] AVAudioSettings = ["objc2-foundation/NSString"] diff --git a/framework-crates/objc2-avf-audio/translation-config.toml b/framework-crates/objc2-avf-audio/translation-config.toml index ecf2a35ef..8631d8f01 100644 --- a/framework-crates/objc2-avf-audio/translation-config.toml +++ b/framework-crates/objc2-avf-audio/translation-config.toml @@ -33,6 +33,12 @@ class.AVAudioEngine.methods."renderOffline:toBuffer:error:".skipped = true # Needs AppKit or UIKit class.AVAudioUnitComponent.methods.icon.skipped = true +# Needs CASpatialAudioExperience, which is not available on macOS (where header-translator runs). +class.AVAudioOutputNode.methods.intendedSpatialExperience.skipped = true +class.AVAudioOutputNode.methods."setIntendedSpatialExperience:".skipped = true +class.AVAudioPlayer.methods.intendedSpatialExperience.skipped = true +class.AVAudioPlayer.methods."setIntendedSpatialExperience:".skipped = true + class.AVAudioBuffer.skipped-protocols = ["NSMutableCopying"] class.AVAudioPCMBuffer.skipped-protocols = ["NSMutableCopying"] class.AVAudioCompressedBuffer.skipped-protocols = ["NSMutableCopying"] diff --git a/framework-crates/objc2-background-assets/Cargo.toml b/framework-crates/objc2-background-assets/Cargo.toml index 8d3cf97af..3db91d931 100644 --- a/framework-crates/objc2-background-assets/Cargo.toml +++ b/framework-crates/objc2-background-assets/Cargo.toml @@ -16,6 +16,7 @@ license.workspace = true workspace = true [dependencies] +bitflags = { workspace = true, optional = true, features = ["std"] } block2 = { workspace = true, optional = true, features = ["alloc"] } objc2 = { workspace = true, features = ["std"] } objc2-foundation = { workspace = true, features = ["alloc"] } @@ -35,23 +36,51 @@ targets = [ default = [ "std", "BAAppExtensionInfo", + "BAAssetPack", + "BAAssetPackManager", + "BAAssetPackManifest", + "BAAssetPackStatus", "BABase", "BADownload", "BADownloadManager", "BADownloaderExtension", "BAError", + "BAManagedAssetPackDownloadDelegate", + "BAManagedDownloaderExtension", + "BAManagedError", "BATypes", "BAURLDownload", + "bitflags", "block2", ] std = ["alloc"] alloc = [] +bitflags = ["dep:bitflags"] block2 = ["dep:block2"] BAAppExtensionInfo = [ "objc2-foundation/NSObject", "objc2-foundation/NSValue", ] +BAAssetPack = [ + "objc2-foundation/NSData", + "objc2-foundation/NSString", +] +BAAssetPackManager = [ + "objc2-foundation/NSData", + "objc2-foundation/NSError", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", +] +BAAssetPackManifest = [ + "objc2-foundation/NSData", + "objc2-foundation/NSError", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", +] +BAAssetPackStatus = ["bitflags"] BABase = [] BADownload = [ "objc2-foundation/NSObject", @@ -75,6 +104,15 @@ BADownloaderExtension = [ "objc2-foundation/NSURLSession", ] BAError = ["objc2-foundation/NSString"] +BAManagedAssetPackDownloadDelegate = [ + "objc2-foundation/NSError", + "objc2-foundation/NSProgress", +] +BAManagedDownloaderExtension = [] +BAManagedError = [ + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] BATypes = [] BAURLDownload = [ "objc2-foundation/NSObject", diff --git a/framework-crates/objc2-background-assets/translation-config.toml b/framework-crates/objc2-background-assets/translation-config.toml index 510c65da5..897b028c1 100644 --- a/framework-crates/objc2-background-assets/translation-config.toml +++ b/framework-crates/objc2-background-assets/translation-config.toml @@ -5,3 +5,6 @@ macos = "13.0" maccatalyst = "16.0" ios = "16.0" visionos = "1.0" + +# unknown error result type Primitive(Int) +class.BAAssetPackManager.methods."fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:".skipped = true diff --git a/framework-crates/objc2-background-tasks/Cargo.toml b/framework-crates/objc2-background-tasks/Cargo.toml index c2255b6ef..7bef37494 100644 --- a/framework-crates/objc2-background-tasks/Cargo.toml +++ b/framework-crates/objc2-background-tasks/Cargo.toml @@ -16,6 +16,7 @@ license.workspace = true workspace = true [dependencies] +bitflags = { workspace = true, optional = true, features = ["std"] } block2 = { workspace = true, optional = true, features = ["alloc"] } dispatch2 = { workspace = true, optional = true, features = [ "alloc", @@ -42,17 +43,23 @@ default = [ "BGTask", "BGTaskRequest", "BGTaskScheduler", + "bitflags", "block2", "dispatch2", ] std = ["alloc"] alloc = [] +bitflags = ["dep:bitflags"] block2 = ["dep:block2"] dispatch2 = ["dep:dispatch2"] BGDefines = [] -BGTask = ["objc2-foundation/NSString"] +BGTask = [ + "objc2-foundation/NSProgress", + "objc2-foundation/NSString", +] BGTaskRequest = [ + "bitflags", "objc2-foundation/NSDate", "objc2-foundation/NSFileManager", "objc2-foundation/NSObject", diff --git a/framework-crates/objc2-browser-engine-core/Cargo.toml b/framework-crates/objc2-browser-engine-core/Cargo.toml index 5c50dcb51..465c38f5f 100644 --- a/framework-crates/objc2-browser-engine-core/Cargo.toml +++ b/framework-crates/objc2-browser-engine-core/Cargo.toml @@ -17,6 +17,16 @@ workspace = true [dependencies] libc = { workspace = true, optional = true } +objc2 = { workspace = true, optional = true, features = ["std"] } +objc2-avf-audio = { workspace = true, optional = true, features = [ + "AVAudioSession", + "AVAudioSessionRoute", +] } +objc2-foundation = { workspace = true, optional = true, features = [ + "NSArray", + "NSError", + "alloc", +] } [package.metadata.docs.rs] default-target = "aarch64-apple-ios" @@ -29,13 +39,21 @@ targets = [ [features] default = [ "std", + "BEAudioSession", "BEMemory", "BEkevent", "libc", + "objc2", + "objc2-avf-audio", + "objc2-foundation", ] std = ["alloc"] alloc = [] libc = ["dep:libc"] +objc2 = ["dep:objc2"] +objc2-avf-audio = ["dep:objc2-avf-audio"] +objc2-foundation = ["dep:objc2-foundation"] +BEAudioSession = [] BEMemory = [] BEkevent = [] diff --git a/framework-crates/objc2-browser-engine-core/translation-config.toml b/framework-crates/objc2-browser-engine-core/translation-config.toml index 666f088ed..43e5aade4 100644 --- a/framework-crates/objc2-browser-engine-core/translation-config.toml +++ b/framework-crates/objc2-browser-engine-core/translation-config.toml @@ -6,6 +6,9 @@ custom-lib-rs = true # macos = "14.3" ios = "17.4" +external.AVAudioSession.module = "AVFAudio.AVAudioSession" +external.AVAudioSessionPortDescription.module = "AVFAudio.AVAudioSessionRoute" + # Empty module.BEMacros.skipped = true diff --git a/framework-crates/objc2-browser-engine-kit/Cargo.toml b/framework-crates/objc2-browser-engine-kit/Cargo.toml index 4aa023eab..77d99b07f 100644 --- a/framework-crates/objc2-browser-engine-kit/Cargo.toml +++ b/framework-crates/objc2-browser-engine-kit/Cargo.toml @@ -18,6 +18,7 @@ workspace = true [dependencies] bitflags = { workspace = true, optional = true, features = ["std"] } block2 = { workspace = true, optional = true, features = ["alloc"] } +libc = { workspace = true, optional = true } objc2 = { workspace = true, features = ["std"] } objc2-av-foundation = { workspace = true, optional = true, features = ["AVCaptureSession"] } objc2-core-foundation = { workspace = true, optional = true, features = [ @@ -48,6 +49,7 @@ default = [ "BEContextMenuConfiguration", "BEDownloads", "BEDragInteraction", + "BEExtensionProcess", "BEKeyEntry", "BEKeyEntryContext", "BELayerHierarchy", @@ -71,6 +73,7 @@ default = [ "BEWebContentProcess", "bitflags", "block2", + "libc", "objc2-av-foundation", "objc2-core-foundation", "objc2-quartz-core", @@ -80,6 +83,7 @@ std = ["alloc"] alloc = [] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] +libc = ["dep:libc"] objc2-av-foundation = ["dep:objc2-av-foundation"] objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-quartz-core = ["dep:objc2-quartz-core"] @@ -129,14 +133,20 @@ BEDragInteraction = [ "objc2-ui-kit/UIDragSession", "objc2-ui-kit/UIInteraction", ] +BEExtensionProcess = [] BEKeyEntry = [ "objc2-foundation/NSDate", "objc2-ui-kit/UIKey", ] BEKeyEntryContext = [] BELayerHierarchy = ["objc2-foundation/NSError"] -BELayerHierarchyHandle = ["objc2-foundation/NSObject"] +BELayerHierarchyHandle = [ + "objc2-foundation/NSData", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", +] BELayerHierarchyHostingTransactionCoordinator = [ + "objc2-foundation/NSData", "objc2-foundation/NSError", "objc2-foundation/NSObject", "objc2-ui-kit/UIResponder", diff --git a/framework-crates/objc2-browser-engine-kit/translation-config.toml b/framework-crates/objc2-browser-engine-kit/translation-config.toml index f114537d7..e88d613fa 100644 --- a/framework-crates/objc2-browser-engine-kit/translation-config.toml +++ b/framework-crates/objc2-browser-engine-kit/translation-config.toml @@ -19,6 +19,7 @@ class.BEMediaEnvironment.methods.createXPCRepresentation.skipped = true class.BENetworkingProcess.methods."makeLibXPCConnectionError:".skipped = true class.BERenderingProcess.methods."makeLibXPCConnectionError:".skipped = true class.BEWebContentProcess.methods."makeLibXPCConnectionError:".skipped = true +protocol.BEExtensionProcess.methods."makeLibXPCConnectionError:".skipped = true # Documentation says the return can be nil. class.BEProcessCapability.methods."requestWithError:".return.nullability = "nullable" diff --git a/framework-crates/objc2-car-play/Cargo.toml b/framework-crates/objc2-car-play/Cargo.toml index 7663440ff..03bdf6ec4 100644 --- a/framework-crates/objc2-car-play/Cargo.toml +++ b/framework-crates/objc2-car-play/Cargo.toml @@ -89,6 +89,12 @@ default = [ "CPLane", "CPLaneGuidance", "CPListImageRowItem", + "CPListImageRowItemCardElement", + "CPListImageRowItemCondensedElement", + "CPListImageRowItemElement", + "CPListImageRowItemGridElement", + "CPListImageRowItemImageGridElement", + "CPListImageRowItemRowElement", "CPListItem", "CPListItemTypes", "CPListSection", @@ -219,6 +225,12 @@ CPListImageRowItem = [ "objc2-foundation/NSArray", "objc2-foundation/NSString", ] +CPListImageRowItemCardElement = ["objc2-foundation/NSString"] +CPListImageRowItemCondensedElement = ["objc2-foundation/NSString"] +CPListImageRowItemElement = [] +CPListImageRowItemGridElement = [] +CPListImageRowItemImageGridElement = [] +CPListImageRowItemRowElement = ["objc2-foundation/NSString"] CPListItem = ["objc2-foundation/NSString"] CPListItemTypes = ["objc2-foundation/NSString"] CPListSection = [ diff --git a/framework-crates/objc2-cinematic/Cargo.toml b/framework-crates/objc2-cinematic/Cargo.toml index 23dee92bd..3ed7e84a5 100644 --- a/framework-crates/objc2-cinematic/Cargo.toml +++ b/framework-crates/objc2-cinematic/Cargo.toml @@ -21,6 +21,7 @@ objc2 = { workspace = true, features = ["std"] } objc2-av-foundation = { workspace = true, optional = true, features = [ "AVAsset", "AVAssetTrack", + "AVAudioMix", "AVComposition", "AVTimedMetadataGroup", ] } @@ -72,6 +73,7 @@ default = [ "CNObjectTracker", "CNRenderingSession", "CNScript", + "CNSpatialAudio", "block2", "objc2-av-foundation", "objc2-core-foundation", @@ -121,3 +123,9 @@ CNScript = [ "objc2-foundation/NSObject", "objc2-foundation/NSProgress", ] +CNSpatialAudio = [ + "objc2-foundation/NSData", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] diff --git a/framework-crates/objc2-cloud-kit/Cargo.toml b/framework-crates/objc2-cloud-kit/Cargo.toml index cb6f0c731..53b436d90 100644 --- a/framework-crates/objc2-cloud-kit/Cargo.toml +++ b/framework-crates/objc2-cloud-kit/Cargo.toml @@ -22,6 +22,9 @@ objc2 = { workspace = true, features = ["std"] } objc2-core-location = { workspace = true, optional = true, features = ["CLLocation"] } objc2-foundation = { workspace = true, features = ["alloc"] } +[target.'cfg(not(target_os = "tvos"))'.dependencies] +objc2-contacts = { workspace = true, optional = true, features = ["CNContact"] } + [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" rustc-args = ["--cfg", "docsrs"] # Fix cross-crate link to objc2::topics @@ -76,8 +79,11 @@ default = [ "CKReference", "CKServerChangeToken", "CKShare", + "CKShareAccessRequester", + "CKShareBlockedIdentity", "CKShareMetadata", "CKShareParticipant", + "CKShareRequestAccessOperation", "CKSubscription", "CKSyncEngine", "CKSyncEngineConfiguration", @@ -90,12 +96,14 @@ default = [ "NSItemProvider_CKSharingSupport", "bitflags", "block2", + "objc2-contacts", "objc2-core-location", ] std = ["alloc"] alloc = [] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] +objc2-contacts = ["dep:objc2-contacts"] objc2-core-location = ["dep:objc2-core-location"] CKAcceptSharesOperation = [ @@ -283,14 +291,23 @@ CKShare = [ "objc2-foundation/NSString", "objc2-foundation/NSURL", ] +CKShareAccessRequester = ["objc2-foundation/NSObject"] +CKShareBlockedIdentity = ["objc2-foundation/NSObject"] CKShareMetadata = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] CKShareParticipant = [ + "objc2-foundation/NSDate", "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +CKShareRequestAccessOperation = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSOperation", + "objc2-foundation/NSURL", +] CKSubscription = [ "bitflags", "objc2-foundation/NSArray", diff --git a/framework-crates/objc2-cloud-kit/translation-config.toml b/framework-crates/objc2-cloud-kit/translation-config.toml index 75bd877ae..b97c4bc4d 100644 --- a/framework-crates/objc2-cloud-kit/translation-config.toml +++ b/framework-crates/objc2-cloud-kit/translation-config.toml @@ -7,3 +7,5 @@ ios = "8.0" tvos = "9.0" watchos = "3.0" visionos = "1.0" + +external.CNContact.module = "Contacts.CNContact" diff --git a/framework-crates/objc2-compositor-services/Cargo.toml b/framework-crates/objc2-compositor-services/Cargo.toml index dba19af96..6a8b18c5f 100644 --- a/framework-crates/objc2-compositor-services/Cargo.toml +++ b/framework-crates/objc2-compositor-services/Cargo.toml @@ -24,8 +24,12 @@ objc2-core-foundation = { workspace = true, optional = true, features = [ "objc2", ] } objc2-metal = { workspace = true, optional = true, features = [ + "MTL4CommandEncoder", + "MTL4CommandQueue", + "MTL4RenderCommandEncoder", "MTLAllocation", "MTLCommandBuffer", + "MTLCommandEncoder", "MTLDevice", "MTLPixelFormat", "MTLRasterizationRate", @@ -47,9 +51,11 @@ default = [ "std", "bitflags", "cp_base", + "cp_conditionals", "cp_error", "cp_types", "drawable", + "drawable_render_context", "frame", "frame_timing", "layer_renderer", @@ -59,6 +65,7 @@ default = [ "layer_renderer_properties", "objc2-core-foundation", "objc2-metal", + "tracking_area", "view", ] std = ["alloc"] @@ -68,9 +75,11 @@ objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-metal = ["dep:objc2-metal"] cp_base = [] +cp_conditionals = [] cp_error = [] cp_types = [] drawable = [] +drawable_render_context = [] frame = [] frame_timing = [] layer_renderer = [] @@ -78,4 +87,5 @@ layer_renderer_capabilities = ["bitflags"] layer_renderer_configuration = [] layer_renderer_layout = [] layer_renderer_properties = [] +tracking_area = [] view = [] diff --git a/framework-crates/objc2-core-graphics/Cargo.toml b/framework-crates/objc2-core-graphics/Cargo.toml index 5b8872d0e..7aed15891 100644 --- a/framework-crates/objc2-core-graphics/Cargo.toml +++ b/framework-crates/objc2-core-graphics/Cargo.toml @@ -83,10 +83,12 @@ default = [ "CGPDFScanner", "CGPDFStream", "CGPDFString", + "CGPDFWrappedObject", "CGPSConverter", "CGPath", "CGPattern", "CGRemoteOperation", + "CGRenderingBufferProvider", "CGSession", "CGShading", "CGToneMapping", @@ -116,7 +118,12 @@ objc2-metal = ["dep:objc2-metal"] CGAffineTransform = ["objc2-core-foundation/CFCGTypes"] CGBase = [] -CGBitmapContext = [] +CGBitmapContext = [ + "bitflags", + "objc2-core-foundation/CFByteOrder", + "objc2-core-foundation/CFDictionary", + "objc2-core-foundation/CFError", +] CGColor = [ "objc2-core-foundation/CFCGTypes", "objc2-core-foundation/CFDictionary", @@ -164,7 +171,7 @@ CGDisplayStream = [ "objc2-core-foundation/CFDictionary", "objc2-core-foundation/CFRunLoop", ] -CGEXRToneMappingGamma = [] +CGEXRToneMappingGamma = ["objc2-core-foundation/CFDictionary"] CGError = [] CGEvent = [ "objc2-core-foundation/CFCGTypes", @@ -219,6 +226,7 @@ CGPDFPage = ["objc2-core-foundation/CFCGTypes"] CGPDFScanner = ["objc2-core-foundation/CFCGTypes"] CGPDFStream = ["objc2-core-foundation/CFData"] CGPDFString = ["objc2-core-foundation/CFDate"] +CGPDFWrappedObject = ["objc2-core-foundation/CFCGTypes"] CGPSConverter = ["objc2-core-foundation/CFDictionary"] CGPath = [ "objc2-core-foundation/CFArray", @@ -231,9 +239,10 @@ CGRemoteOperation = [ "objc2-core-foundation/CFDate", "objc2-core-foundation/CFMachPort", ] +CGRenderingBufferProvider = ["objc2-core-foundation/CFData"] CGSession = ["objc2-core-foundation/CFDictionary"] CGShading = ["objc2-core-foundation/CFCGTypes"] -CGToneMapping = [] +CGToneMapping = ["objc2-core-foundation/CFDictionary"] CGWindow = [ "bitflags", "objc2-core-foundation/CFArray", diff --git a/framework-crates/objc2-core-graphics/src/image.rs b/framework-crates/objc2-core-graphics/src/image.rs index f9bf1058c..03860d34c 100644 --- a/framework-crates/objc2-core-graphics/src/image.rs +++ b/framework-crates/objc2-core-graphics/src/image.rs @@ -1,6 +1,6 @@ -use crate::CGBitmapInfo; +use crate::{CGBitmapInfo, CGImageByteOrderInfo}; -#[allow(non_upper_case_globals)] +#[allow(non_upper_case_globals, deprecated)] impl CGBitmapInfo { #[doc(alias = "kCGBitmapByteOrder16Host")] pub const ByteOrder16Host: Self = if cfg!(target_endian = "big") { @@ -16,3 +16,20 @@ impl CGBitmapInfo { Self::ByteOrder32Little }; } + +#[allow(non_upper_case_globals, deprecated)] +impl CGImageByteOrderInfo { + #[doc(alias = "kCGImageByteOrder16Host")] + pub const Order16Host: Self = if cfg!(target_endian = "big") { + Self::Order16Big + } else { + Self::Order16Little + }; + + #[doc(alias = "kCGImageByteOrder32Host")] + pub const Order32Host: Self = if cfg!(target_endian = "big") { + Self::Order32Big + } else { + Self::Order32Little + }; +} diff --git a/framework-crates/objc2-core-graphics/translation-config.toml b/framework-crates/objc2-core-graphics/translation-config.toml index b6c1d9bb7..f9b8147e8 100644 --- a/framework-crates/objc2-core-graphics/translation-config.toml +++ b/framework-crates/objc2-core-graphics/translation-config.toml @@ -44,6 +44,8 @@ static.kCGFontIndexInvalid.use-value = true # Dependent on target endianness static.kCGBitmapByteOrder16Host.skipped = true static.kCGBitmapByteOrder32Host.skipped = true +const.kCGImageByteOrder16Host.skipped = true +const.kCGImageByteOrder32Host.skipped = true # Uses defines from IOKit enum.CGEventFlags.use-value = true diff --git a/framework-crates/objc2-core-haptics/translation-config.toml b/framework-crates/objc2-core-haptics/translation-config.toml index 1eb01c23b..64b67f4d1 100644 --- a/framework-crates/objc2-core-haptics/translation-config.toml +++ b/framework-crates/objc2-core-haptics/translation-config.toml @@ -8,6 +8,10 @@ visionos = "1.0" external.AVAudioSession.module = "AVFAudio.AVAudioSession" +# Needs CASpatialAudioExperience, which is not available on macOS (where header-translator runs). +class.CHHapticEngine.methods.intendedSpatialExperience.skipped = true +class.CHHapticEngine.methods."setIntendedSpatialExperience:".skipped = true + # Needs `ns_string!` that works reliably in statics. static.CoreHapticsErrorDomain.skipped = true diff --git a/framework-crates/objc2-core-image/Cargo.toml b/framework-crates/objc2-core-image/Cargo.toml index eb5fe350b..5eb7d9ef5 100644 --- a/framework-crates/objc2-core-image/Cargo.toml +++ b/framework-crates/objc2-core-image/Cargo.toml @@ -224,6 +224,7 @@ CIRAWFilter_Deprecated = [ CIRenderDestination = [ "objc2-foundation/NSDate", "objc2-foundation/NSError", + "objc2-foundation/NSURL", ] CISampler = [ "objc2-foundation/NSDictionary", diff --git a/framework-crates/objc2-core-location/Cargo.modified.toml b/framework-crates/objc2-core-location/Cargo.modified.toml new file mode 100644 index 000000000..0e078f698 --- /dev/null +++ b/framework-crates/objc2-core-location/Cargo.modified.toml @@ -0,0 +1,6 @@ +[features] +# CLLocation is no longer in CoreLocation, but was moved to _LocationEssentials +CLLocation = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSObject", +] diff --git a/framework-crates/objc2-core-location/Cargo.toml b/framework-crates/objc2-core-location/Cargo.toml index 9f7048610..120d2ebe4 100644 --- a/framework-crates/objc2-core-location/Cargo.toml +++ b/framework-crates/objc2-core-location/Cargo.toml @@ -76,6 +76,10 @@ default = [ ] std = ["alloc"] alloc = [] +CLLocation = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSObject", +] block2 = ["dep:block2"] dispatch2 = ["dep:dispatch2"] objc2-contacts = ["dep:objc2-contacts"] @@ -118,10 +122,6 @@ CLHeading = [ "objc2-foundation/NSDate", "objc2-foundation/NSObject", ] -CLLocation = [ - "objc2-foundation/NSDate", - "objc2-foundation/NSObject", -] CLLocationManager = [ "objc2-foundation/NSArray", "objc2-foundation/NSData", diff --git a/framework-crates/objc2-core-location/src/lib.rs b/framework-crates/objc2-core-location/src/lib.rs index 2f15b2e88..a90d2d44e 100644 --- a/framework-crates/objc2-core-location/src/lib.rs +++ b/framework-crates/objc2-core-location/src/lib.rs @@ -16,5 +16,9 @@ extern crate alloc; extern crate std; mod generated; +#[cfg(feature = "CLLocation")] +mod location; #[allow(unused_imports, unreachable_pub)] pub use self::generated::*; +#[cfg(feature = "CLLocation")] +pub use self::location::*; diff --git a/framework-crates/objc2-core-location/src/location.rs b/framework-crates/objc2-core-location/src/location.rs new file mode 100644 index 000000000..69f778999 --- /dev/null +++ b/framework-crates/objc2-core-location/src/location.rs @@ -0,0 +1,497 @@ +//! Inlined from the underscore-named framework _LocationEssentials, was moved +//! from CoreLocation to there in Xcode 26, but it probably intended to be a +//! private implementation detail. +//! +//! Find it with: +//! ```sh +//! ls $(xcrun --show-sdk-path)/System/Library/Frameworks/_LocationEssentials.framework/Headers/CLLocationEssentials.h +//! ``` +#![allow(non_snake_case, unused_imports)] +#![allow(clippy::missing_safety_doc)] +#![allow(clippy::too_many_arguments)] +use core::ffi::c_double; +use core::ptr::NonNull; +use objc2::encode::{Encode, Encoding, RefEncode}; +use objc2::rc::{Allocated, Retained}; +use objc2::runtime::Bool; +use objc2::{extern_class, extern_conformance, extern_methods}; +use objc2_foundation::{ + CopyingHelper, NSCoding, NSCopying, NSDate, NSInteger, NSObject, NSObjectProtocol, + NSSecureCoding, NSTimeInterval, +}; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationdegrees?language=objc) +pub type CLLocationDegrees = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationaccuracy?language=objc) +pub type CLLocationAccuracy = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationspeed?language=objc) +pub type CLLocationSpeed = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationspeedaccuracy?language=objc) +pub type CLLocationSpeedAccuracy = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationdirection?language=objc) +pub type CLLocationDirection = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationdirectionaccuracy?language=objc) +pub type CLLocationDirectionAccuracy = c_double; + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationcoordinate2d?language=objc) +#[repr(C)] +#[derive(Clone, Copy, Debug, PartialEq)] +pub struct CLLocationCoordinate2D { + pub latitude: CLLocationDegrees, + pub longitude: CLLocationDegrees, +} + +unsafe impl Encode for CLLocationCoordinate2D { + const ENCODING: Encoding = Encoding::Struct( + "CLLocationCoordinate2D", + &[::ENCODING, ::ENCODING], + ); +} + +unsafe impl RefEncode for CLLocationCoordinate2D { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +} + +/// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationdistance?language=objc) +pub type CLLocationDistance = c_double; + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcldistancefilternone?language=objc) + pub static kCLDistanceFilterNone: CLLocationDistance; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracybestfornavigation?language=objc) + pub static kCLLocationAccuracyBestForNavigation: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracybest?language=objc) + pub static kCLLocationAccuracyBest: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracynearesttenmeters?language=objc) + pub static kCLLocationAccuracyNearestTenMeters: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracyhundredmeters?language=objc) + pub static kCLLocationAccuracyHundredMeters: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracykilometer?language=objc) + pub static kCLLocationAccuracyKilometer: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracythreekilometers?language=objc) + pub static kCLLocationAccuracyThreeKilometers: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationaccuracyreduced?language=objc) + pub static kCLLocationAccuracyReduced: CLLocationAccuracy; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationdistancemax?language=objc) + pub static CLLocationDistanceMax: CLLocationDistance; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cltimeintervalmax?language=objc) + pub static CLTimeIntervalMax: NSTimeInterval; +} + +extern "C" { + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/kcllocationcoordinate2dinvalid?language=objc) + pub static kCLLocationCoordinate2DInvalid: CLLocationCoordinate2D; +} + +impl CLLocationCoordinate2D { + #[doc(alias = "CLLocationCoordinate2DIsValid")] + #[inline] + pub unsafe fn is_valid(self) -> bool { + extern "C-unwind" { + fn CLLocationCoordinate2DIsValid(coord: CLLocationCoordinate2D) -> Bool; + } + unsafe { CLLocationCoordinate2DIsValid(self) }.as_bool() + } + + #[doc(alias = "CLLocationCoordinate2DMake")] + #[inline] + pub unsafe fn new( + latitude: CLLocationDegrees, + longitude: CLLocationDegrees, + ) -> CLLocationCoordinate2D { + extern "C-unwind" { + fn CLLocationCoordinate2DMake( + latitude: CLLocationDegrees, + longitude: CLLocationDegrees, + ) -> CLLocationCoordinate2D; + } + unsafe { CLLocationCoordinate2DMake(latitude, longitude) } + } +} + +extern_class!( + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/clfloor?language=objc) + #[unsafe(super(NSObject))] + #[derive(Debug, PartialEq, Eq, Hash)] + pub struct CLFloor; +); + +extern_conformance!( + unsafe impl NSCoding for CLFloor {} +); + +extern_conformance!( + unsafe impl NSCopying for CLFloor {} +); + +unsafe impl CopyingHelper for CLFloor { + type Result = Self; +} + +extern_conformance!( + unsafe impl NSObjectProtocol for CLFloor {} +); + +extern_conformance!( + unsafe impl NSSecureCoding for CLFloor {} +); + +impl CLFloor { + extern_methods!( + #[unsafe(method(level))] + #[unsafe(method_family = none)] + pub unsafe fn level(&self) -> NSInteger; + ); +} + +/// Methods declared on superclass `NSObject`. +impl CLFloor { + extern_methods!( + #[unsafe(method(init))] + #[unsafe(method_family = init)] + pub unsafe fn init(this: Allocated) -> Retained; + + #[unsafe(method(new))] + #[unsafe(method_family = new)] + pub unsafe fn new() -> Retained; + ); +} + +extern_class!( + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocationsourceinformation?language=objc) + #[unsafe(super(NSObject))] + #[derive(Debug, PartialEq, Eq, Hash)] + pub struct CLLocationSourceInformation; +); + +extern_conformance!( + unsafe impl NSCoding for CLLocationSourceInformation {} +); + +extern_conformance!( + unsafe impl NSCopying for CLLocationSourceInformation {} +); + +unsafe impl CopyingHelper for CLLocationSourceInformation { + type Result = Self; +} + +extern_conformance!( + unsafe impl NSObjectProtocol for CLLocationSourceInformation {} +); + +extern_conformance!( + unsafe impl NSSecureCoding for CLLocationSourceInformation {} +); + +impl CLLocationSourceInformation { + extern_methods!( + #[unsafe(method(initWithSoftwareSimulationState:andExternalAccessoryState:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithSoftwareSimulationState_andExternalAccessoryState( + this: Allocated, + is_software: bool, + is_accessory: bool, + ) -> Retained; + + #[unsafe(method(isSimulatedBySoftware))] + #[unsafe(method_family = none)] + pub unsafe fn isSimulatedBySoftware(&self) -> bool; + + #[unsafe(method(isProducedByAccessory))] + #[unsafe(method_family = none)] + pub unsafe fn isProducedByAccessory(&self) -> bool; + ); +} + +/// Methods declared on superclass `NSObject`. +impl CLLocationSourceInformation { + extern_methods!( + #[unsafe(method(init))] + #[unsafe(method_family = init)] + pub unsafe fn init(this: Allocated) -> Retained; + + #[unsafe(method(new))] + #[unsafe(method_family = new)] + pub unsafe fn new() -> Retained; + ); +} + +extern_class!( + /// [Apple's documentation](https://developer.apple.com/documentation/corelocation/cllocation?language=objc) + #[unsafe(super(NSObject))] + #[derive(Debug, PartialEq, Eq, Hash)] + pub struct CLLocation; +); + +unsafe impl Send for CLLocation {} + +unsafe impl Sync for CLLocation {} + +extern_conformance!( + unsafe impl NSCoding for CLLocation {} +); + +extern_conformance!( + unsafe impl NSCopying for CLLocation {} +); + +unsafe impl CopyingHelper for CLLocation { + type Result = Self; +} + +extern_conformance!( + unsafe impl NSObjectProtocol for CLLocation {} +); + +extern_conformance!( + unsafe impl NSSecureCoding for CLLocation {} +); + +impl CLLocation { + extern_methods!( + #[unsafe(method(initWithLatitude:longitude:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithLatitude_longitude( + this: Allocated, + latitude: CLLocationDegrees, + longitude: CLLocationDegrees, + ) -> Retained; + + #[unsafe(method(initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:timestamp:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_timestamp( + this: Allocated, + coordinate: CLLocationCoordinate2D, + altitude: CLLocationDistance, + h_accuracy: CLLocationAccuracy, + v_accuracy: CLLocationAccuracy, + timestamp: &NSDate, + ) -> Retained; + + #[unsafe(method(initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:speed:timestamp:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_speed_timestamp( + this: Allocated, + coordinate: CLLocationCoordinate2D, + altitude: CLLocationDistance, + h_accuracy: CLLocationAccuracy, + v_accuracy: CLLocationAccuracy, + course: CLLocationDirection, + speed: CLLocationSpeed, + timestamp: &NSDate, + ) -> Retained; + + #[unsafe(method(initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_courseAccuracy_speed_speedAccuracy_timestamp( + this: Allocated, + coordinate: CLLocationCoordinate2D, + altitude: CLLocationDistance, + h_accuracy: CLLocationAccuracy, + v_accuracy: CLLocationAccuracy, + course: CLLocationDirection, + course_accuracy: CLLocationDirectionAccuracy, + speed: CLLocationSpeed, + speed_accuracy: CLLocationSpeedAccuracy, + timestamp: &NSDate, + ) -> Retained; + + #[unsafe(method(initWithCoordinate:altitude:horizontalAccuracy:verticalAccuracy:course:courseAccuracy:speed:speedAccuracy:timestamp:sourceInfo:))] + #[unsafe(method_family = init)] + pub unsafe fn initWithCoordinate_altitude_horizontalAccuracy_verticalAccuracy_course_courseAccuracy_speed_speedAccuracy_timestamp_sourceInfo( + this: Allocated, + coordinate: CLLocationCoordinate2D, + altitude: CLLocationDistance, + h_accuracy: CLLocationAccuracy, + v_accuracy: CLLocationAccuracy, + course: CLLocationDirection, + course_accuracy: CLLocationDirectionAccuracy, + speed: CLLocationSpeed, + speed_accuracy: CLLocationSpeedAccuracy, + timestamp: &NSDate, + source_info: &CLLocationSourceInformation, + ) -> Retained; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(coordinate))] + #[unsafe(method_family = none)] + pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(altitude))] + #[unsafe(method_family = none)] + pub unsafe fn altitude(&self) -> CLLocationDistance; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(ellipsoidalAltitude))] + #[unsafe(method_family = none)] + pub unsafe fn ellipsoidalAltitude(&self) -> CLLocationDistance; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(horizontalAccuracy))] + #[unsafe(method_family = none)] + pub unsafe fn horizontalAccuracy(&self) -> CLLocationAccuracy; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(verticalAccuracy))] + #[unsafe(method_family = none)] + pub unsafe fn verticalAccuracy(&self) -> CLLocationAccuracy; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(course))] + #[unsafe(method_family = none)] + pub unsafe fn course(&self) -> CLLocationDirection; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(courseAccuracy))] + #[unsafe(method_family = none)] + pub unsafe fn courseAccuracy(&self) -> CLLocationDirectionAccuracy; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(speed))] + #[unsafe(method_family = none)] + pub unsafe fn speed(&self) -> CLLocationSpeed; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(speedAccuracy))] + #[unsafe(method_family = none)] + pub unsafe fn speedAccuracy(&self) -> CLLocationSpeedAccuracy; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(timestamp))] + #[unsafe(method_family = none)] + pub unsafe fn timestamp(&self) -> Retained; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(floor))] + #[unsafe(method_family = none)] + pub unsafe fn floor(&self) -> Option>; + + /// This property is not atomic. + /// + /// # Safety + /// + /// This might not be thread-safe. + #[unsafe(method(sourceInformation))] + #[unsafe(method_family = none)] + pub unsafe fn sourceInformation(&self) -> Option>; + + #[deprecated] + #[unsafe(method(getDistanceFrom:))] + #[unsafe(method_family = none)] + pub unsafe fn getDistanceFrom(&self, location: &CLLocation) -> CLLocationDistance; + + #[unsafe(method(distanceFromLocation:))] + #[unsafe(method_family = none)] + pub unsafe fn distanceFromLocation(&self, location: &CLLocation) -> CLLocationDistance; + ); +} + +/// Methods declared on superclass `NSObject`. +impl CLLocation { + extern_methods!( + #[unsafe(method(init))] + #[unsafe(method_family = init)] + pub unsafe fn init(this: Allocated) -> Retained; + + #[unsafe(method(new))] + #[unsafe(method_family = new)] + pub unsafe fn new() -> Retained; + ); +} + +#[deprecated = "renamed to `CLLocationCoordinate2D::is_valid`"] +#[inline] +pub unsafe extern "C-unwind" fn CLLocationCoordinate2DIsValid( + coord: CLLocationCoordinate2D, +) -> bool { + extern "C-unwind" { + fn CLLocationCoordinate2DIsValid(coord: CLLocationCoordinate2D) -> Bool; + } + unsafe { CLLocationCoordinate2DIsValid(coord) }.as_bool() +} + +extern "C-unwind" { + #[deprecated = "renamed to `CLLocationCoordinate2D::new`"] + pub fn CLLocationCoordinate2DMake( + latitude: CLLocationDegrees, + longitude: CLLocationDegrees, + ) -> CLLocationCoordinate2D; +} diff --git a/framework-crates/objc2-core-location/translation-config.toml b/framework-crates/objc2-core-location/translation-config.toml index b05d1a919..894d6280f 100644 --- a/framework-crates/objc2-core-location/translation-config.toml +++ b/framework-crates/objc2-core-location/translation-config.toml @@ -1,6 +1,7 @@ framework = "CoreLocation" crate = "objc2-core-location" required-crates = ["objc2", "objc2-foundation"] +custom-lib-rs = true # macos = "10.6" macos = "10.11" # Temporarily raised since `CoreLocation` imports `Contacts` maccatalyst = "13.0" diff --git a/framework-crates/objc2-core-media/Cargo.toml b/framework-crates/objc2-core-media/Cargo.toml index 5c9c02826..c3631c2ea 100644 --- a/framework-crates/objc2-core-media/Cargo.toml +++ b/framework-crates/objc2-core-media/Cargo.toml @@ -120,7 +120,10 @@ CMTagCollection = [ "objc2-core-foundation/CFData", "objc2-core-foundation/CFDictionary", ] -CMTaggedBufferGroup = ["objc2-core-foundation/CFArray"] +CMTaggedBufferGroup = [ + "objc2-core-foundation/CFArray", + "objc2-core-foundation/CFDictionary", +] CMTextMarkup = [] CMTime = [ "bitflags", diff --git a/framework-crates/objc2-core-telephony/Cargo.toml b/framework-crates/objc2-core-telephony/Cargo.toml index 927aeb855..0fd96a5c0 100644 --- a/framework-crates/objc2-core-telephony/Cargo.toml +++ b/framework-crates/objc2-core-telephony/Cargo.toml @@ -37,8 +37,10 @@ default = [ "CTCallCenter", "CTCarrier", "CTCellularData", + "CTCellularPlanProperties", "CTCellularPlanProvisioning", "CTCellularPlanProvisioningRequest", + "CTCellularPlanStatus", "CTSubscriber", "CTSubscriberInfo", "CTTelephonyNetworkInfo", @@ -53,11 +55,20 @@ CTCall = ["objc2-foundation/NSString"] CTCallCenter = ["objc2-foundation/NSSet"] CTCarrier = ["objc2-foundation/NSString"] CTCellularData = [] -CTCellularPlanProvisioning = [] +CTCellularPlanProperties = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +CTCellularPlanProvisioning = ["objc2-foundation/NSError"] CTCellularPlanProvisioningRequest = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +CTCellularPlanStatus = [ + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] CTSubscriber = [ "objc2-foundation/NSData", "objc2-foundation/NSString", diff --git a/framework-crates/objc2-crypto-token-kit/Cargo.toml b/framework-crates/objc2-crypto-token-kit/Cargo.toml index 65d747cad..5b499f410 100644 --- a/framework-crates/objc2-crypto-token-kit/Cargo.toml +++ b/framework-crates/objc2-crypto-token-kit/Cargo.toml @@ -46,7 +46,9 @@ default = [ "TKError", "TKSmartCard", "TKSmartCardATR", + "TKSmartCardSlotNFCSession", "TKSmartCardToken", + "TKSmartCardTokenRegistrationManager", "TKTLVRecord", "TKToken", "TKTokenConfiguration", @@ -80,12 +82,21 @@ TKSmartCardATR = [ "objc2-foundation/NSData", "objc2-foundation/NSValue", ] +TKSmartCardSlotNFCSession = [ + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] TKSmartCardToken = [ "objc2-foundation/NSData", "objc2-foundation/NSError", "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +TKSmartCardTokenRegistrationManager = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] TKTLVRecord = [ "objc2-foundation/NSArray", "objc2-foundation/NSData", diff --git a/framework-crates/objc2-file-provider/Cargo.toml b/framework-crates/objc2-file-provider/Cargo.toml index 3f1fc58d7..f07ea4d77 100644 --- a/framework-crates/objc2-file-provider/Cargo.toml +++ b/framework-crates/objc2-file-provider/Cargo.toml @@ -52,6 +52,7 @@ default = [ "NSFileProviderModifyItemOptions", "NSFileProviderReplicatedExtension", "NSFileProviderRequest", + "NSFileProviderSearch", "NSFileProviderService", "NSFileProviderTesting", "NSFileProviderThumbnailing", @@ -140,6 +141,14 @@ NSFileProviderReplicatedExtension = [ "objc2-foundation/NSURL", ] NSFileProviderRequest = ["objc2-foundation/NSURL"] +NSFileProviderSearch = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSData", + "objc2-foundation/NSDate", + "objc2-foundation/NSError", + "objc2-foundation/NSString", + "objc2-foundation/NSValue", +] NSFileProviderService = [ "objc2-foundation/NSArray", "objc2-foundation/NSError", diff --git a/framework-crates/objc2-fs-kit/Cargo.toml b/framework-crates/objc2-fs-kit/Cargo.toml index 9745a19dc..837c8b67a 100644 --- a/framework-crates/objc2-fs-kit/Cargo.toml +++ b/framework-crates/objc2-fs-kit/Cargo.toml @@ -106,6 +106,7 @@ FSResource = [ "objc2-foundation/NSObject", "objc2-foundation/NSProgress", "objc2-foundation/NSString", + "objc2-foundation/NSURL", ] FSTask = [ "objc2-foundation/NSError", diff --git a/framework-crates/objc2-game-controller/Cargo.toml b/framework-crates/objc2-game-controller/Cargo.toml index 5a094ab97..326f384df 100644 --- a/framework-crates/objc2-game-controller/Cargo.toml +++ b/framework-crates/objc2-game-controller/Cargo.toml @@ -99,6 +99,7 @@ default = [ "GCMouse", "GCMouseInput", "GCPhysicalInputElement", + "GCPhysicalInputExtents", "GCPhysicalInputProfile", "GCPhysicalInputSource", "GCPressedStateInput", @@ -106,7 +107,9 @@ default = [ "GCRacingWheel", "GCRacingWheelInput", "GCRelativeInput", + "GCSpatialAccessory", "GCSteeringWheelElement", + "GCStylus", "GCSwitchElement", "GCSwitchPositionInput", "GCSyntheticDeviceKeys", @@ -204,6 +207,7 @@ GCPhysicalInputElement = [ "objc2-foundation/NSSet", "objc2-foundation/NSString", ] +GCPhysicalInputExtents = [] GCPhysicalInputProfile = [ "objc2-foundation/NSDate", "objc2-foundation/NSDictionary", @@ -230,7 +234,12 @@ GCRelativeInput = [ "objc2-foundation/NSDate", "objc2-foundation/NSSet", ] +GCSpatialAccessory = [] GCSteeringWheelElement = [] +GCStylus = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSString", +] GCSwitchElement = [] GCSwitchPositionInput = [ "objc2-foundation/NSDate", diff --git a/framework-crates/objc2-game-kit/Cargo.toml b/framework-crates/objc2-game-kit/Cargo.toml index 3bcb34e8d..6c84ac3be 100644 --- a/framework-crates/objc2-game-kit/Cargo.toml +++ b/framework-crates/objc2-game-kit/Cargo.toml @@ -55,6 +55,7 @@ default = [ "GKAchievementViewController", "GKBasePlayer", "GKChallenge", + "GKChallengeDefinition", "GKChallengeEventHandler", "GKChallengesViewController", "GKCloudPlayer", @@ -63,6 +64,11 @@ default = [ "GKError", "GKEventListener", "GKFriendRequestComposeViewController", + "GKGameActivity", + "GKGameActivityDefinition", + "GKGameActivityListener", + "GKGameActivityPlayStyle", + "GKGameActivityState", "GKGameCenterViewController", "GKGameSession", "GKGameSessionError", @@ -116,6 +122,7 @@ GKAchievement = [ ] GKAchievementDescription = [ "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSObject", "objc2-foundation/NSString", @@ -134,6 +141,12 @@ GKChallenge = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +GKChallengeDefinition = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSCalendar", + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] GKChallengeEventHandler = [] GKChallengesViewController = [ "objc2-foundation/NSBundle", @@ -161,6 +174,26 @@ GKFriendRequestComposeViewController = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +GKGameActivity = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDate", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", +] +GKGameActivityDefinition = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSError", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", + "objc2-foundation/NSValue", +] +GKGameActivityListener = [] +GKGameActivityPlayStyle = [] +GKGameActivityState = [] GKGameCenterViewController = [ "objc2-foundation/NSBundle", "objc2-foundation/NSCoder", @@ -184,6 +217,7 @@ GKGameSessionSharingViewController = [] GKLeaderboard = [ "objc2-foundation/NSArray", "objc2-foundation/NSDate", + "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSRange", "objc2-foundation/NSString", diff --git a/framework-crates/objc2-health-kit/Cargo.toml b/framework-crates/objc2-health-kit/Cargo.toml index f18c83357..376fe957c 100644 --- a/framework-crates/objc2-health-kit/Cargo.toml +++ b/framework-crates/objc2-health-kit/Cargo.toml @@ -55,6 +55,7 @@ default = [ "HKCategoryValues", "HKCharacteristicObjects", "HKCharacteristicValues", + "HKClinicalCoding", "HKClinicalRecord", "HKClinicalType", "HKContactsLensSpecification", @@ -77,6 +78,7 @@ default = [ "HKGAD7Assessment", "HKGlassesLensSpecification", "HKGlassesPrescription", + "HKHealthConceptIdentifier", "HKHealthStore", "HKHeartbeatSeriesBuilder", "HKHeartbeatSeriesQuery", @@ -84,7 +86,10 @@ default = [ "HKLensSpecification", "HKLiveWorkoutBuilder", "HKLiveWorkoutDataSource", + "HKMedicationConcept", + "HKMedicationDoseEvent", "HKMetadata", + "HKMetadataEnums", "HKObject", "HKObjectType", "HKObserverQuery", @@ -111,6 +116,8 @@ default = [ "HKStatisticsQuery", "HKTypeIdentifiers", "HKUnit", + "HKUserAnnotatedMedication", + "HKUserAnnotatedMedicationQuery", "HKVerifiableClinicalRecord", "HKVerifiableClinicalRecordQuery", "HKVerifiableClinicalRecordSubject", @@ -207,6 +214,10 @@ HKCategorySample = [ HKCategoryValues = [] HKCharacteristicObjects = ["objc2-foundation/NSObject"] HKCharacteristicValues = [] +HKClinicalCoding = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] HKClinicalRecord = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", @@ -312,6 +323,10 @@ HKGlassesPrescription = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +HKHealthConceptIdentifier = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] HKHealthStore = [ "objc2-foundation/NSArray", "objc2-foundation/NSCalendar", @@ -342,7 +357,19 @@ HKLiveWorkoutDataSource = [ "objc2-foundation/NSPredicate", "objc2-foundation/NSSet", ] +HKMedicationConcept = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSSet", + "objc2-foundation/NSString", +] +HKMedicationDoseEvent = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSValue", +] HKMetadata = ["objc2-foundation/NSString"] +HKMetadataEnums = [] HKObject = [ "objc2-foundation/NSDictionary", "objc2-foundation/NSObject", @@ -474,6 +501,14 @@ HKUnit = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +HKUserAnnotatedMedication = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +HKUserAnnotatedMedicationQuery = [ + "objc2-foundation/NSError", + "objc2-foundation/NSPredicate", +] HKVerifiableClinicalRecord = [ "objc2-foundation/NSArray", "objc2-foundation/NSData", @@ -549,5 +584,6 @@ HKWorkoutSession = [ "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSObject", + "objc2-foundation/NSSet", "objc2-foundation/NSString", ] diff --git a/framework-crates/objc2-map-kit/Cargo.toml b/framework-crates/objc2-map-kit/Cargo.toml index c32b00f93..fb4bb2155 100644 --- a/framework-crates/objc2-map-kit/Cargo.toml +++ b/framework-crates/objc2-map-kit/Cargo.toml @@ -75,7 +75,9 @@ targets = [ [features] default = [ "std", + "MKAddress", "MKAddressFilter", + "MKAddressRepresentations", "MKAnnotation", "MKAnnotationView", "MKCircle", @@ -89,6 +91,7 @@ default = [ "MKDistanceFormatter", "MKFoundation", "MKGeoJSONSerialization", + "MKGeocodingRequest", "MKGeodesicPolyline", "MKGeometry", "MKGradientPolylineRenderer", @@ -137,6 +140,7 @@ default = [ "MKPolygonRenderer", "MKPolyline", "MKPolylineRenderer", + "MKReverseGeocodingRequest", "MKSelectionAccessory", "MKShape", "MKStandardMapConfiguration", @@ -167,10 +171,12 @@ objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-core-graphics = ["dep:objc2-core-graphics"] objc2-core-location = ["dep:objc2-core-location"] +MKAddress = ["objc2-foundation/NSString"] MKAddressFilter = [ "bitflags", "objc2-foundation/NSObject", ] +MKAddressRepresentations = ["objc2-foundation/NSString"] MKAnnotation = ["objc2-foundation/NSString"] MKAnnotationView = [ "objc2-foundation/NSCoder", @@ -215,6 +221,12 @@ MKGeoJSONSerialization = [ "objc2-foundation/NSError", "objc2-foundation/NSString", ] +MKGeocodingRequest = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSLocale", + "objc2-foundation/NSString", +] MKGeodesicPolyline = [] MKGeometry = ["objc2-foundation/NSValue"] MKGradientPolylineRenderer = [ @@ -348,6 +360,11 @@ MKPolygon = ["objc2-foundation/NSArray"] MKPolygonRenderer = [] MKPolyline = [] MKPolylineRenderer = [] +MKReverseGeocodingRequest = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSLocale", +] MKSelectionAccessory = [] MKShape = ["objc2-foundation/NSString"] MKStandardMapConfiguration = ["objc2-foundation/NSObject"] diff --git a/framework-crates/objc2-media-extension/Cargo.toml b/framework-crates/objc2-media-extension/Cargo.toml index 83d7ef2ca..fa3af2322 100644 --- a/framework-crates/objc2-media-extension/Cargo.toml +++ b/framework-crates/objc2-media-extension/Cargo.toml @@ -95,6 +95,7 @@ MEFormatReader = [ ] MERAWProcessor = [ "objc2-foundation/NSArray", + "objc2-foundation/NSData", "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSNotification", diff --git a/framework-crates/objc2-media-player/Cargo.toml b/framework-crates/objc2-media-player/Cargo.toml index 41d903370..9c7e70bf5 100644 --- a/framework-crates/objc2-media-player/Cargo.toml +++ b/framework-crates/objc2-media-player/Cargo.toml @@ -177,6 +177,7 @@ MPMusicPlayerQueueDescriptor = [ "objc2-foundation/NSString", ] MPNowPlayingInfoCenter = [ + "objc2-foundation/NSArray", "objc2-foundation/NSDictionary", "objc2-foundation/NSString", ] diff --git a/framework-crates/objc2-messages/Cargo.toml b/framework-crates/objc2-messages/Cargo.toml index c34f9bfb6..5d2aa06b4 100644 --- a/framework-crates/objc2-messages/Cargo.toml +++ b/framework-crates/objc2-messages/Cargo.toml @@ -26,6 +26,7 @@ objc2-foundation = { workspace = true, features = ["alloc"] } objc2-quartz-core = { workspace = true, optional = true, features = ["CALayer"] } objc2-ui-kit = { workspace = true, optional = true, features = [ "UIAppearance", + "UIColor", "UIDynamicBehavior", "UIFocus", "UIGeometry", diff --git a/framework-crates/objc2-metal-fx/Cargo.toml b/framework-crates/objc2-metal-fx/Cargo.toml index cf7e609df..f3154af30 100644 --- a/framework-crates/objc2-metal-fx/Cargo.toml +++ b/framework-crates/objc2-metal-fx/Cargo.toml @@ -34,16 +34,49 @@ targets = [ [features] default = [ "std", + "MTL4FXFrameInterpolator", + "MTL4FXSpatialScaler", + "MTL4FXTemporalDenoisedScaler", + "MTL4FXTemporalScaler", "MTLFXDefines", + "MTLFXFrameInterpolator", "MTLFXSpatialScaler", + "MTLFXTemporalDenoisedScaler", "MTLFXTemporalScaler", ] std = ["alloc"] alloc = [] +MTL4FXFrameInterpolator = ["objc2-metal/MTL4CommandBuffer"] +MTL4FXSpatialScaler = ["objc2-metal/MTL4CommandBuffer"] +MTL4FXTemporalDenoisedScaler = ["objc2-metal/MTL4CommandBuffer"] +MTL4FXTemporalScaler = ["objc2-metal/MTL4CommandBuffer"] MTLFXDefines = [] +MTLFXFrameInterpolator = [ + "objc2-foundation/NSObject", + "objc2-metal/MTL4Compiler", + "objc2-metal/MTLAllocation", + "objc2-metal/MTLCommandBuffer", + "objc2-metal/MTLDevice", + "objc2-metal/MTLFence", + "objc2-metal/MTLPixelFormat", + "objc2-metal/MTLResource", + "objc2-metal/MTLTexture", +] MTLFXSpatialScaler = [ "objc2-foundation/NSObject", + "objc2-metal/MTL4Compiler", + "objc2-metal/MTLAllocation", + "objc2-metal/MTLCommandBuffer", + "objc2-metal/MTLDevice", + "objc2-metal/MTLFence", + "objc2-metal/MTLPixelFormat", + "objc2-metal/MTLResource", + "objc2-metal/MTLTexture", +] +MTLFXTemporalDenoisedScaler = [ + "objc2-foundation/NSObject", + "objc2-metal/MTL4Compiler", "objc2-metal/MTLAllocation", "objc2-metal/MTLCommandBuffer", "objc2-metal/MTLDevice", @@ -54,6 +87,7 @@ MTLFXSpatialScaler = [ ] MTLFXTemporalScaler = [ "objc2-foundation/NSObject", + "objc2-metal/MTL4Compiler", "objc2-metal/MTLAllocation", "objc2-metal/MTLCommandBuffer", "objc2-metal/MTLDevice", diff --git a/framework-crates/objc2-metal-kit/Cargo.toml b/framework-crates/objc2-metal-kit/Cargo.toml index 49b42876d..1ff819395 100644 --- a/framework-crates/objc2-metal-kit/Cargo.toml +++ b/framework-crates/objc2-metal-kit/Cargo.toml @@ -97,11 +97,11 @@ MTKModel = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", "objc2-metal/MTLAllocation", + "objc2-metal/MTLArgument", "objc2-metal/MTLBuffer", "objc2-metal/MTLDevice", "objc2-metal/MTLRenderCommandEncoder", "objc2-metal/MTLResource", - "objc2-metal/MTLStageInputOutputDescriptor", "objc2-metal/MTLVertexDescriptor", ] MTKTextureLoader = [ @@ -122,6 +122,7 @@ MTKView = [ "objc2-foundation/NSGeometry", "objc2-foundation/NSObject", "objc2-foundation/objc2-core-foundation", + "objc2-metal/MTL4RenderPass", "objc2-metal/MTLAllocation", "objc2-metal/MTLDevice", "objc2-metal/MTLPixelFormat", diff --git a/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml b/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml index 2850b1044..87395a0f7 100644 --- a/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml +++ b/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml @@ -225,6 +225,7 @@ MPSGraphTensorData = [ "objc2-metal/MTLAllocation", "objc2-metal/MTLBuffer", "objc2-metal/MTLResource", + "objc2-metal/MTLTensor", ] MPSGraphTensorShapeOps = [ "objc2-foundation/NSArray", diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml index e3cffaf98..fd0104fe3 100644 --- a/framework-crates/objc2-metal/Cargo.toml +++ b/framework-crates/objc2-metal/Cargo.toml @@ -49,6 +49,37 @@ features = ["objc2-io-surface"] [features] default = [ "std", + "MTL4AccelerationStructure", + "MTL4Archive", + "MTL4ArgumentTable", + "MTL4BinaryFunction", + "MTL4BinaryFunctionDescriptor", + "MTL4CommandAllocator", + "MTL4CommandBuffer", + "MTL4CommandEncoder", + "MTL4CommandQueue", + "MTL4CommitFeedback", + "MTL4Compiler", + "MTL4CompilerTask", + "MTL4ComputeCommandEncoder", + "MTL4ComputePipeline", + "MTL4Counters", + "MTL4FunctionDescriptor", + "MTL4LibraryDescriptor", + "MTL4LibraryFunctionDescriptor", + "MTL4LinkedFunctions", + "MTL4LinkingDescriptor", + "MTL4MachineLearningCommandEncoder", + "MTL4MachineLearningPipeline", + "MTL4MeshRenderPipeline", + "MTL4PipelineDataSetSerializer", + "MTL4PipelineState", + "MTL4RenderCommandEncoder", + "MTL4RenderPass", + "MTL4RenderPipeline", + "MTL4SpecializedFunctionDescriptor", + "MTL4StitchedFunctionDescriptor", + "MTL4TileRenderPipeline", "MTLAccelerationStructure", "MTLAccelerationStructureCommandEncoder", "MTLAccelerationStructureTypes", @@ -68,6 +99,7 @@ default = [ "MTLComputePass", "MTLComputePipeline", "MTLCounters", + "MTLDataType", "MTLDefines", "MTLDepthStencil", "MTLDevice", @@ -102,9 +134,12 @@ default = [ "MTLResource", "MTLResourceStateCommandEncoder", "MTLResourceStatePass", + "MTLResourceViewPool", "MTLSampler", "MTLStageInputOutputDescriptor", + "MTLTensor", "MTLTexture", + "MTLTextureViewPool", "MTLTypes", "MTLVertexDescriptor", "MTLVisibleFunctionTable", @@ -125,16 +160,127 @@ dispatch2 = ["dep:dispatch2"] objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-io-surface = ["dep:objc2-io-surface"] -MTLAccelerationStructure = [ +MTL4AccelerationStructure = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4Archive = [ + "objc2-foundation/NSError", + "objc2-foundation/NSString", +] +MTL4ArgumentTable = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4BinaryFunction = ["objc2-foundation/NSString"] +MTL4BinaryFunctionDescriptor = [ + "bitflags", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4CommandAllocator = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4CommandBuffer = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", +] +MTL4CommandEncoder = [ + "bitflags", + "objc2-foundation/NSString", +] +MTL4CommandQueue = [ + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", +] +MTL4CommitFeedback = ["objc2-foundation/NSError"] +MTL4Compiler = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", +] +MTL4CompilerTask = [] +MTL4ComputeCommandEncoder = ["objc2-foundation/NSRange"] +MTL4ComputePipeline = ["objc2-foundation/NSObject"] +MTL4Counters = [ + "objc2-foundation/NSData", + "objc2-foundation/NSObject", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", +] +MTL4FunctionDescriptor = ["objc2-foundation/NSObject"] +MTL4LibraryDescriptor = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4LibraryFunctionDescriptor = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4LinkedFunctions = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4LinkingDescriptor = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4MachineLearningCommandEncoder = [] +MTL4MachineLearningPipeline = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", +] +MTL4MeshRenderPipeline = ["objc2-foundation/NSObject"] +MTL4PipelineDataSetSerializer = [ + "bitflags", + "objc2-foundation/NSData", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSURL", +] +MTL4PipelineState = [ + "bitflags", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +MTL4RenderCommandEncoder = [ "bitflags", + "objc2-foundation/NSRange", +] +MTL4RenderPass = ["objc2-foundation/NSObject"] +MTL4RenderPipeline = [ "objc2-foundation/NSArray", "objc2-foundation/NSObject", +] +MTL4SpecializedFunctionDescriptor = [ + "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -MTLAccelerationStructureCommandEncoder = [ +MTL4StitchedFunctionDescriptor = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", +] +MTL4TileRenderPipeline = ["objc2-foundation/NSObject"] +MTLAccelerationStructure = [ "bitflags", + "objc2-foundation/NSArray", "objc2-foundation/NSObject", + "objc2-foundation/NSString", ] +MTLAccelerationStructureCommandEncoder = ["objc2-foundation/NSObject"] MTLAccelerationStructureTypes = [] MTLAllocation = [] MTLArgument = [ @@ -157,6 +303,7 @@ MTLBlitCommandEncoder = [ ] MTLBlitPass = ["objc2-foundation/NSObject"] MTLBuffer = [ + "objc2-foundation/NSError", "objc2-foundation/NSRange", "objc2-foundation/NSString", ] @@ -199,6 +346,7 @@ MTLCounters = [ "objc2-foundation/NSRange", "objc2-foundation/NSString", ] +MTLDataType = [] MTLDefines = [] MTLDepthStencil = [ "objc2-foundation/NSObject", @@ -329,17 +477,29 @@ MTLResource = [ ] MTLResourceStateCommandEncoder = [] MTLResourceStatePass = ["objc2-foundation/NSObject"] +MTLResourceViewPool = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSRange", + "objc2-foundation/NSString", +] MTLSampler = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] MTLStageInputOutputDescriptor = ["objc2-foundation/NSObject"] +MTLTensor = [ + "bitflags", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] MTLTexture = [ "bitflags", "objc2-foundation/NSObject", "objc2-foundation/NSRange", "objc2-foundation/NSString", ] +MTLTextureViewPool = [] MTLTypes = [] MTLVertexDescriptor = ["objc2-foundation/NSObject"] MTLVisibleFunctionTable = [ diff --git a/framework-crates/objc2-metal/translation-config.toml b/framework-crates/objc2-metal/translation-config.toml index c7f85ba72..5abc3e2e0 100644 --- a/framework-crates/objc2-metal/translation-config.toml +++ b/framework-crates/objc2-metal/translation-config.toml @@ -26,6 +26,9 @@ fn.MTLPackedFloat3Make.skipped = true # Manually defined to allow it to work on older OSes. fn.MTLCopyAllDevices.skipped = true +# isize referencing usize. +enum.MTLTensorDataType.use-value = true + ### ### Safety ### diff --git a/framework-crates/objc2-metric-kit/Cargo.toml b/framework-crates/objc2-metric-kit/Cargo.toml index 6164c420b..a43931c49 100644 --- a/framework-crates/objc2-metric-kit/Cargo.toml +++ b/framework-crates/objc2-metric-kit/Cargo.toml @@ -50,6 +50,7 @@ default = [ "MXDiagnostic", "MXDiagnosticPayload", "MXDiskIOMetric", + "MXDiskSpaceUsageMetric", "MXDiskWriteExceptionDiagnostic", "MXDisplayMetric", "MXError", @@ -152,6 +153,11 @@ MXDiskIOMetric = [ "objc2-foundation/NSObject", "objc2-foundation/NSUnit", ] +MXDiskSpaceUsageMetric = [ + "objc2-foundation/NSMeasurement", + "objc2-foundation/NSObject", + "objc2-foundation/NSUnit", +] MXDiskWriteExceptionDiagnostic = [ "objc2-foundation/NSMeasurement", "objc2-foundation/NSObject", diff --git a/framework-crates/objc2-nearby-interaction/Cargo.toml b/framework-crates/objc2-nearby-interaction/Cargo.toml index 3738f11dd..f3d887918 100644 --- a/framework-crates/objc2-nearby-interaction/Cargo.toml +++ b/framework-crates/objc2-nearby-interaction/Cargo.toml @@ -45,6 +45,7 @@ default = [ "std", "NIAlgorithmConvergenceStatusReason", "NIConfiguration", + "NIDLTDOAMeasurement", "NIDeviceCapability", "NIError", "NIExport", @@ -65,6 +66,7 @@ NIConfiguration = [ "objc2-foundation/NSObject", "objc2-foundation/NSUUID", ] +NIDLTDOAMeasurement = ["objc2-foundation/NSObject"] NIDeviceCapability = [] NIError = [ "objc2-foundation/NSError", diff --git a/framework-crates/objc2-pass-kit/Cargo.toml b/framework-crates/objc2-pass-kit/Cargo.toml index 2871dd56b..89c5e1249 100644 --- a/framework-crates/objc2-pass-kit/Cargo.toml +++ b/framework-crates/objc2-pass-kit/Cargo.toml @@ -108,6 +108,7 @@ default = [ "PKObject", "PKPass", "PKPassLibrary", + "PKPassRelevantDate", "PKPass_Types", "PKPayment", "PKPaymentAuthorizationController", @@ -270,6 +271,10 @@ PKPassLibrary = [ "objc2-foundation/NSSet", "objc2-foundation/NSString", ] +PKPassRelevantDate = [ + "objc2-foundation/NSDate", + "objc2-foundation/NSDateInterval", +] PKPass_Types = [] PKPayment = [] PKPaymentAuthorizationController = [ diff --git a/framework-crates/objc2-pass-kit/translation-config.toml b/framework-crates/objc2-pass-kit/translation-config.toml index b43df8cab..ed343c075 100644 --- a/framework-crates/objc2-pass-kit/translation-config.toml +++ b/framework-crates/objc2-pass-kit/translation-config.toml @@ -23,3 +23,7 @@ const.PKPassTypeAny.skipped = true # # import PassKit.PKPassRelevantDate class.PKPass.methods.relevantDates.skipped = true + +# FIXME: Duplicated for some reason? +class.PKPassRelevantDate.methods.init.skipped = true +class.PKPassRelevantDate.methods.new.skipped = true diff --git a/framework-crates/objc2-pencil-kit/Cargo.toml b/framework-crates/objc2-pencil-kit/Cargo.toml index 8a3406b75..7ae168f2c 100644 --- a/framework-crates/objc2-pencil-kit/Cargo.toml +++ b/framework-crates/objc2-pencil-kit/Cargo.toml @@ -57,6 +57,9 @@ default = [ "PKStrokePath", "PKStrokePoint", "PKTool", + "PKToolPickerEraserItem", + "PKToolPickerInkingItem", + "PKToolPickerItem", "block2", "objc2-app-kit", "objc2-core-foundation", @@ -100,3 +103,12 @@ PKStrokePoint = [ "objc2-foundation/NSObject", ] PKTool = ["objc2-foundation/NSObject"] +PKToolPickerEraserItem = ["objc2-foundation/NSObject"] +PKToolPickerInkingItem = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +PKToolPickerItem = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] diff --git a/framework-crates/objc2-quartz-core/Cargo.toml b/framework-crates/objc2-quartz-core/Cargo.toml index 4ef96f9f0..ba28ba1c4 100644 --- a/framework-crates/objc2-quartz-core/Cargo.toml +++ b/framework-crates/objc2-quartz-core/Cargo.toml @@ -42,6 +42,7 @@ objc2-metal = { workspace = true, optional = true, features = [ "MTLDevice", "MTLDrawable", "MTLPixelFormat", + "MTLResidencySet", "MTLResource", "MTLTexture", ] } @@ -69,6 +70,7 @@ default = [ "CABase", "CAConstraintLayoutManager", "CADisplayLink", + "CAEAGLLayer", "CAEDRMetadata", "CAEmitterCell", "CAEmitterLayer", @@ -134,6 +136,7 @@ CADisplayLink = [ "objc2-foundation/NSRunLoop", "objc2-foundation/NSString", ] +CAEAGLLayer = [] CAEDRMetadata = [ "objc2-foundation/NSData", "objc2-foundation/NSObject", diff --git a/framework-crates/objc2-screen-capture-kit/Cargo.toml b/framework-crates/objc2-screen-capture-kit/Cargo.toml index 3af2ac4c5..5c76fa477 100644 --- a/framework-crates/objc2-screen-capture-kit/Cargo.toml +++ b/framework-crates/objc2-screen-capture-kit/Cargo.toml @@ -46,6 +46,7 @@ objc2-core-media = { workspace = true, optional = true, features = [ "objc2", ] } objc2-foundation = { workspace = true, features = ["alloc"] } +objc2-uniform-type-identifiers = { workspace = true, optional = true, features = ["UTType"] } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -72,6 +73,7 @@ default = [ "objc2-core-foundation", "objc2-core-graphics", "objc2-core-media", + "objc2-uniform-type-identifiers", ] std = ["alloc"] alloc = [] @@ -83,6 +85,7 @@ objc2-av-foundation = ["dep:objc2-av-foundation"] objc2-core-foundation = ["dep:objc2-core-foundation"] objc2-core-graphics = ["dep:objc2-core-graphics"] objc2-core-media = ["dep:objc2-core-media"] +objc2-uniform-type-identifiers = ["dep:objc2-uniform-type-identifiers"] SCContentSharingPicker = [ "bitflags", @@ -97,7 +100,11 @@ SCRecordingOutput = [ "objc2-foundation/NSError", "objc2-foundation/NSURL", ] -SCScreenshotManager = ["objc2-foundation/NSError"] +SCScreenshotManager = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSURL", +] SCShareableContent = [ "objc2-foundation/NSArray", "objc2-foundation/NSError", diff --git a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml index 1bfaf0514..7096b9aae 100644 --- a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml +++ b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml @@ -18,11 +18,22 @@ workspace = true [dependencies] block2 = { workspace = true, optional = true, features = ["alloc"] } objc2 = { workspace = true, features = ["std"] } +objc2-av-foundation = { workspace = true, optional = true, features = ["AVCaptureInput"] } objc2-core-graphics = { workspace = true, optional = true, features = [ "CGImage", "objc2", ] } +objc2-core-video = { workspace = true, optional = true, features = [ + "CVBuffer", + "CVImageBuffer", + "CVPixelBuffer", + "objc2", +] } objc2-foundation = { workspace = true, features = ["alloc"] } +objc2-video-toolbox = { workspace = true, optional = true, features = [ + "VTDecompressionSession", + "objc2", +] } [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" @@ -39,13 +50,20 @@ default = [ "std", "SCSensitivityAnalysis", "SCSensitivityAnalyzer", + "SCVideoStreamAnalyzer_Public", "block2", + "objc2-av-foundation", "objc2-core-graphics", + "objc2-core-video", + "objc2-video-toolbox", ] std = ["alloc"] alloc = [] block2 = ["dep:block2"] +objc2-av-foundation = ["dep:objc2-av-foundation"] objc2-core-graphics = ["dep:objc2-core-graphics"] +objc2-core-video = ["dep:objc2-core-video"] +objc2-video-toolbox = ["dep:objc2-video-toolbox"] SCSensitivityAnalysis = [] SCSensitivityAnalyzer = [ @@ -53,3 +71,8 @@ SCSensitivityAnalyzer = [ "objc2-foundation/NSProgress", "objc2-foundation/NSURL", ] +SCVideoStreamAnalyzer_Public = [ + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] diff --git a/framework-crates/objc2-sensitive-content-analysis/translation-config.toml b/framework-crates/objc2-sensitive-content-analysis/translation-config.toml index fe1612625..354b6fe21 100644 --- a/framework-crates/objc2-sensitive-content-analysis/translation-config.toml +++ b/framework-crates/objc2-sensitive-content-analysis/translation-config.toml @@ -4,3 +4,5 @@ required-crates = ["objc2", "objc2-foundation"] macos = "14.0" maccatalyst = "17.0" ios = "17.0" + +external.AVCaptureDeviceInput.module = "AVFoundation.AVCaptureInput" diff --git a/framework-crates/objc2-sensor-kit/Cargo.modified.toml b/framework-crates/objc2-sensor-kit/Cargo.modified.toml new file mode 100644 index 000000000..058580479 --- /dev/null +++ b/framework-crates/objc2-sensor-kit/Cargo.modified.toml @@ -0,0 +1,6 @@ +[dependencies] +objc2-ar-kit = { workspace = true, optional = true, features = [ + "ARAnchor", # Added + "ARFaceAnchor", + "objc2", +] } diff --git a/framework-crates/objc2-sensor-kit/Cargo.toml b/framework-crates/objc2-sensor-kit/Cargo.toml index 73961c2ff..30c859f04 100644 --- a/framework-crates/objc2-sensor-kit/Cargo.toml +++ b/framework-crates/objc2-sensor-kit/Cargo.toml @@ -20,7 +20,7 @@ bitflags = { workspace = true, features = ["std"] } block2 = { workspace = true, optional = true, features = ["alloc"] } objc2 = { workspace = true, features = ["std"] } objc2-ar-kit = { workspace = true, optional = true, features = [ - "ARAnchor", + "ARAnchor", # Added "ARFaceAnchor", "objc2", ] } diff --git a/framework-crates/objc2-sensor-kit/translation-config.toml b/framework-crates/objc2-sensor-kit/translation-config.toml index 1e616142d..b09c91482 100644 --- a/framework-crates/objc2-sensor-kit/translation-config.toml +++ b/framework-crates/objc2-sensor-kit/translation-config.toml @@ -8,3 +8,5 @@ ios = "14.0" # unfortunately emitted as a single large file. # # This is also why `bitflags` is (currently) a required dependency. + +external.ARFaceAnchor.module = "ARKit.ARFaceAnchor" diff --git a/framework-crates/objc2-store-kit/Cargo.toml b/framework-crates/objc2-store-kit/Cargo.toml index 2aedc3e14..8652ab634 100644 --- a/framework-crates/objc2-store-kit/Cargo.toml +++ b/framework-crates/objc2-store-kit/Cargo.toml @@ -35,6 +35,12 @@ objc2-app-kit = { workspace = true, optional = true, features = [ "NSViewController", ] } +[target.'cfg(not(any(target_os = "tvos", target_os = "watchos")))'.dependencies] +objc2-background-assets = { workspace = true, optional = true, features = [ + "BADownloaderExtension", + "BAManagedDownloaderExtension", +] } + [package.metadata.docs.rs] default-target = "aarch64-apple-darwin" rustc-args = ["--cfg", "docsrs"] # Fix cross-crate link to objc2::topics @@ -47,6 +53,7 @@ targets = [ "aarch64-apple-ios-macabi", "aarch64-apple-visionos", ] +features = ["objc2-background-assets"] [features] default = [ @@ -58,6 +65,7 @@ default = [ "SKCloudServiceController", "SKCloudServiceSetupViewController", "SKDownload", + "SKDownloaderExtension", "SKError", "SKOverlay", "SKOverlayConfiguration", @@ -86,6 +94,7 @@ alloc = [] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] +objc2-background-assets = ["dep:objc2-background-assets"] objc2-core-foundation = ["dep:objc2-core-foundation"] SKANError = ["objc2-foundation/NSString"] @@ -122,6 +131,7 @@ SKDownload = [ "objc2-foundation/NSURL", "objc2-foundation/NSValue", ] +SKDownloaderExtension = [] SKError = ["objc2-foundation/NSString"] SKOverlay = ["objc2-foundation/NSError"] SKOverlayConfiguration = ["objc2-foundation/NSString"] diff --git a/framework-crates/objc2-ui-kit/Cargo.toml b/framework-crates/objc2-ui-kit/Cargo.toml index 9ee4b32d2..ad97efa62 100644 --- a/framework-crates/objc2-ui-kit/Cargo.toml +++ b/framework-crates/objc2-ui-kit/Cargo.toml @@ -150,10 +150,12 @@ default = [ "UIApplicationShortcutItem", "UIAttachmentBehavior", "UIBackgroundConfiguration", + "UIBackgroundExtensionView", "UIBandSelectionInteraction", "UIBarAppearance", "UIBarButtonItem", "UIBarButtonItemAppearance", + "UIBarButtonItemBadge", "UIBarButtonItemGroup", "UIBarCommon", "UIBarItem", @@ -201,6 +203,7 @@ default = [ "UIContentUnavailableView", "UIContextMenuConfiguration", "UIContextMenuInteraction", + "UIContextMenuSystem", "UIContextualAction", "UIControl", "UIConversationContext", @@ -241,10 +244,13 @@ default = [ "UIFocus", "UIFocusAnimationCoordinator", "UIFocusDebugger", + "UIFocusDefines", "UIFocusEffect", "UIFocusGuide", "UIFocusMovementHint", "UIFocusSystem", + "UIFocusSystem_UIKitAdditions", + "UIFocusUpdateContext_UIKitAdditions", "UIFont", "UIFontDescriptor", "UIFontMetrics", @@ -254,6 +260,7 @@ default = [ "UIGeometry", "UIGestureRecognizer", "UIGestureRecognizerSubclass", + "UIGlassEffect", "UIGraphics", "UIGraphicsImageRenderer", "UIGraphicsPDFRenderer", @@ -300,6 +307,7 @@ default = [ "UILongPressGestureRecognizer", "UIMailConversationContext", "UIMailConversationEntry", + "UIMainMenuSystem", "UIManagedDocument", "UIMenu", "UIMenuBuilder", @@ -366,19 +374,24 @@ default = [ "UIRotationGestureRecognizer", "UIScene", "UISceneActivationConditions", + "UISceneConfiguration", "UISceneDefinitions", + "UISceneDestructionCondition", "UISceneEnhancedStateRestoration", "UISceneOptions", "UISceneSession", "UISceneSessionActivationRequest", + "UISceneSizeRestrictions", "UISceneSystemProtectionManager", "UISceneWindowingBehaviors", + "UISceneWindowingControlStyle", "UIScene_AVAudioSession", "UIScreen", "UIScreenEdgePanGestureRecognizer", "UIScreenMode", "UIScreenshotService", "UIScribbleInteraction", + "UIScrollEdgeElementContainerInteraction", "UIScrollView", "UISearchBar", "UISearchContainerViewController", @@ -393,9 +406,11 @@ default = [ "UIShape", "UISheetPresentationController", "UISlider", + "UISliderTrackConfiguration", "UISmartReplySuggestion", "UISnapBehavior", "UISplitViewController", + "UISplitViewControllerLayoutEnvironment", "UISpringLoadedInteraction", "UISpringLoadedInteractionSupporting", "UIStackView", @@ -410,8 +425,10 @@ default = [ "UISwipeActionsConfiguration", "UISwipeGestureRecognizer", "UISwitch", + "UISymbolContentTransition", "UISymbolEffectCompletion", "UITab", + "UITabAccessory", "UITabBar", "UITabBarAppearance", "UITabBarController", @@ -480,6 +497,7 @@ default = [ "UIViewControllerTransition", "UIViewControllerTransitionCoordinator", "UIViewControllerTransitioning", + "UIViewLayoutRegion", "UIViewPropertyAnimator", "UIVisualEffect", "UIVisualEffectView", @@ -833,6 +851,10 @@ UIApplicationShortcutItem = [ ] UIAttachmentBehavior = ["objc2-foundation/NSArray"] UIBackgroundConfiguration = ["objc2-foundation/NSObject"] +UIBackgroundExtensionView = [ + "objc2-foundation/NSCoder", + "objc2-foundation/NSObject", +] UIBandSelectionInteraction = [] UIBarAppearance = [ "objc2-foundation/NSCoder", @@ -851,6 +873,10 @@ UIBarButtonItemAppearance = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +UIBarButtonItemBadge = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] UIBarButtonItemGroup = [ "objc2-foundation/NSArray", "objc2-foundation/NSCoder", @@ -1046,6 +1072,7 @@ UIContextMenuConfiguration = [ "objc2-foundation/NSSet", ] UIContextMenuInteraction = ["objc2-foundation/NSObject"] +UIContextMenuSystem = [] UIContextualAction = ["objc2-foundation/NSString"] UIControl = [ "bitflags", @@ -1081,6 +1108,7 @@ UIDeferredMenuElement = [ "objc2-foundation/NSArray", "objc2-foundation/NSCoder", "objc2-foundation/NSObject", + "objc2-foundation/NSString", ] UIDevice = [ "objc2-foundation/NSNotification", @@ -1226,16 +1254,19 @@ UIFocus = [ ] UIFocusAnimationCoordinator = ["objc2-foundation/NSDate"] UIFocusDebugger = [] +UIFocusDefines = [] UIFocusEffect = ["objc2-foundation/NSObject"] UIFocusGuide = [ "objc2-foundation/NSArray", "objc2-foundation/NSObject", ] UIFocusMovementHint = ["objc2-foundation/NSObject"] -UIFocusSystem = [ +UIFocusSystem = [] +UIFocusSystem_UIKitAdditions = [ "objc2-foundation/NSString", "objc2-foundation/NSURL", ] +UIFocusUpdateContext_UIKitAdditions = [] UIFont = [ "objc2-foundation/NSArray", "objc2-foundation/NSObject", @@ -1277,6 +1308,7 @@ UIGestureRecognizer = [ "objc2-foundation/NSValue", ] UIGestureRecognizerSubclass = ["objc2-foundation/NSSet"] +UIGlassEffect = ["objc2-foundation/NSObject"] UIGraphics = [ "objc2-foundation/NSData", "objc2-foundation/NSDictionary", @@ -1442,6 +1474,7 @@ UIMailConversationEntry = [ "objc2-foundation/NSSet", "objc2-foundation/NSString", ] +UIMainMenuSystem = ["objc2-foundation/NSObject"] UIManagedDocument = [ "objc2-foundation/NSDictionary", "objc2-foundation/NSError", @@ -1508,6 +1541,7 @@ UINavigationController = [ ] UINavigationItem = [ "objc2-foundation/NSArray", + "objc2-foundation/NSAttributedString", "objc2-foundation/NSCoder", "objc2-foundation/NSObject", "objc2-foundation/NSRange", @@ -1693,10 +1727,15 @@ UISceneActivationConditions = [ "objc2-foundation/NSString", "objc2-foundation/NSUserActivity", ] +UISceneConfiguration = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] UISceneDefinitions = [ "objc2-foundation/NSError", "objc2-foundation/NSString", ] +UISceneDestructionCondition = ["objc2-foundation/NSObject"] UISceneEnhancedStateRestoration = [] UISceneOptions = [ "objc2-foundation/NSSet", @@ -1714,11 +1753,13 @@ UISceneSessionActivationRequest = [ "objc2-foundation/NSString", "objc2-foundation/NSUserActivity", ] +UISceneSizeRestrictions = [] UISceneSystemProtectionManager = [ "objc2-foundation/NSNotification", "objc2-foundation/NSString", ] UISceneWindowingBehaviors = [] +UISceneWindowingControlStyle = [] UIScene_AVAudioSession = [] UIScreen = [ "objc2-foundation/NSArray", @@ -1729,6 +1770,7 @@ UIScreenEdgePanGestureRecognizer = ["objc2-foundation/NSCoder"] UIScreenMode = [] UIScreenshotService = ["objc2-foundation/NSData"] UIScribbleInteraction = [] +UIScrollEdgeElementContainerInteraction = [] UIScrollView = [ "objc2-foundation/NSCoder", "objc2-foundation/NSObject", @@ -1788,6 +1830,11 @@ UISlider = [ "objc2-foundation/NSCoder", "objc2-foundation/NSObject", ] +UISliderTrackConfiguration = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] UISmartReplySuggestion = ["objc2-foundation/NSString"] UISnapBehavior = [] UISplitViewController = [ @@ -1797,6 +1844,7 @@ UISplitViewController = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +UISplitViewControllerLayoutEnvironment = [] UISpringLoadedInteraction = [] UISpringLoadedInteractionSupporting = [] UIStackView = [ @@ -1837,8 +1885,10 @@ UISwitch = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +UISymbolContentTransition = ["objc2-foundation/NSObject"] UISymbolEffectCompletion = [] UITab = ["objc2-foundation/NSString"] +UITabAccessory = [] UITabBar = [ "objc2-foundation/NSArray", "objc2-foundation/NSCoder", @@ -1937,6 +1987,7 @@ UITextField = [ "objc2-foundation/NSObject", "objc2-foundation/NSRange", "objc2-foundation/NSString", + "objc2-foundation/NSValue", ] UITextFormattingCoordinator = [ "objc2-foundation/NSAttributedString", @@ -2126,6 +2177,7 @@ UIViewControllerTransitioning = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +UIViewLayoutRegion = [] UIViewPropertyAnimator = [ "objc2-foundation/NSDate", "objc2-foundation/NSObject", diff --git a/framework-crates/objc2-ui-kit/src/coordinate_space.rs b/framework-crates/objc2-ui-kit/src/coordinate_space.rs new file mode 100644 index 000000000..0cba862a1 --- /dev/null +++ b/framework-crates/objc2-ui-kit/src/coordinate_space.rs @@ -0,0 +1,61 @@ +//! Inlined from UIUtilities's UICoordinateSpace.h, was moved from UIKit's +//! UIView.h to there in Xcode 26 (but it is unclear whether UIUtilities is +//! intended to be publicly exposed). +//! +//! Find it with: +//! ```sh +//! ls $(xcrun --sdk iphoneos --show-sdk-path)/System/Library/SubFrameworks/UIUtilities.framework/Headers/UICoordinateSpace.h +//! ``` + +#![allow(unused_imports, non_snake_case)] +#![allow(clippy::missing_safety_doc)] +use objc2::runtime::{NSObjectProtocol, ProtocolObject}; +use objc2::{extern_protocol, MainThreadOnly}; +#[cfg(feature = "objc2-core-foundation")] +use objc2_core_foundation::{CGPoint, CGRect}; + +extern_protocol!( + /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicoordinatespace?language=objc) + pub unsafe trait UICoordinateSpace: NSObjectProtocol + MainThreadOnly { + #[cfg(feature = "objc2-core-foundation")] + #[unsafe(method(convertPoint:toCoordinateSpace:))] + #[unsafe(method_family = none)] + fn convertPoint_toCoordinateSpace( + &self, + point: CGPoint, + coordinate_space: &ProtocolObject, + ) -> CGPoint; + + #[cfg(feature = "objc2-core-foundation")] + #[unsafe(method(convertPoint:fromCoordinateSpace:))] + #[unsafe(method_family = none)] + fn convertPoint_fromCoordinateSpace( + &self, + point: CGPoint, + coordinate_space: &ProtocolObject, + ) -> CGPoint; + + #[cfg(feature = "objc2-core-foundation")] + #[unsafe(method(convertRect:toCoordinateSpace:))] + #[unsafe(method_family = none)] + fn convertRect_toCoordinateSpace( + &self, + rect: CGRect, + coordinate_space: &ProtocolObject, + ) -> CGRect; + + #[cfg(feature = "objc2-core-foundation")] + #[unsafe(method(convertRect:fromCoordinateSpace:))] + #[unsafe(method_family = none)] + fn convertRect_fromCoordinateSpace( + &self, + rect: CGRect, + coordinate_space: &ProtocolObject, + ) -> CGRect; + + #[cfg(feature = "objc2-core-foundation")] + #[unsafe(method(bounds))] + #[unsafe(method_family = none)] + fn bounds(&self) -> CGRect; + } +); diff --git a/framework-crates/objc2-ui-kit/src/geometry.rs b/framework-crates/objc2-ui-kit/src/geometry.rs new file mode 100644 index 000000000..8cdbf7599 --- /dev/null +++ b/framework-crates/objc2-ui-kit/src/geometry.rs @@ -0,0 +1,66 @@ +//! Inlined from UIUtilities' UIGeometry.h, was moved from UIKit to there in +//! Xcode 26 (but it is unclear whether UIUtilities is intended to be +//! publicly exposed). +//! +//! Find it with: +//! ```sh +//! ls $(xcrun --sdk iphoneos --show-sdk-path)/System/Library/SubFrameworks/UIUtilities.framework/Headers/UIGeometry.h +//! ``` +use objc2::encode::{Encode, Encoding, RefEncode}; +use objc2_foundation::NSUInteger; + +/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uirectedge?language=objc) +// NS_OPTIONS +#[repr(transparent)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct UIRectEdge(pub NSUInteger); +bitflags::bitflags! { + impl UIRectEdge: NSUInteger { + #[doc(alias = "UIRectEdgeNone")] + const None = 0; + #[doc(alias = "UIRectEdgeTop")] + const Top = 1<<0; + #[doc(alias = "UIRectEdgeLeft")] + const Left = 1<<1; + #[doc(alias = "UIRectEdgeBottom")] + const Bottom = 1<<2; + #[doc(alias = "UIRectEdgeRight")] + const Right = 1<<3; + #[doc(alias = "UIRectEdgeAll")] + const All = UIRectEdge::Top.0|UIRectEdge::Left.0|UIRectEdge::Bottom.0|UIRectEdge::Right.0; + } +} + +unsafe impl Encode for UIRectEdge { + const ENCODING: Encoding = NSUInteger::ENCODING; +} + +unsafe impl RefEncode for UIRectEdge { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +} + +/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiaxis?language=objc) +// NS_OPTIONS +#[repr(transparent)] +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct UIAxis(pub NSUInteger); +bitflags::bitflags! { + impl UIAxis: NSUInteger { + #[doc(alias = "UIAxisNeither")] + const Neither = 0; + #[doc(alias = "UIAxisHorizontal")] + const Horizontal = 1<<0; + #[doc(alias = "UIAxisVertical")] + const Vertical = 1<<1; + #[doc(alias = "UIAxisBoth")] + const Both = UIAxis::Horizontal.0|UIAxis::Vertical.0; + } +} + +unsafe impl Encode for UIAxis { + const ENCODING: Encoding = NSUInteger::ENCODING; +} + +unsafe impl RefEncode for UIAxis { + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); +} diff --git a/framework-crates/objc2-ui-kit/src/lib.rs b/framework-crates/objc2-ui-kit/src/lib.rs index 1eaef2f27..590b1d456 100644 --- a/framework-crates/objc2-ui-kit/src/lib.rs +++ b/framework-crates/objc2-ui-kit/src/lib.rs @@ -18,7 +18,11 @@ extern crate std; #[cfg(feature = "UIApplication")] mod application; +#[cfg(feature = "UIView")] +mod coordinate_space; mod generated; +#[cfg(feature = "UIGeometry")] +mod geometry; #[cfg(feature = "UIGestureRecognizer")] mod gesture_recognizer; #[cfg(feature = "UIPasteConfigurationSupporting")] @@ -30,8 +34,12 @@ mod tests; #[cfg(feature = "NSText")] mod text; +#[cfg(feature = "UIView")] +pub use self::coordinate_space::*; #[allow(unused_imports, unreachable_pub)] pub use self::generated::*; +#[cfg(feature = "UIGeometry")] +pub use self::geometry::*; #[cfg(feature = "UIResponder")] pub use self::responder::*; #[cfg(feature = "NSText")] diff --git a/framework-crates/objc2-ui-kit/translation-config.toml b/framework-crates/objc2-ui-kit/translation-config.toml index 5cfb7a1e2..9a93a42c0 100644 --- a/framework-crates/objc2-ui-kit/translation-config.toml +++ b/framework-crates/objc2-ui-kit/translation-config.toml @@ -9,6 +9,7 @@ watchos = "2.0" visionos = "1.0" external.INIntent.module = "Intents.INIntent" +external.INIntentResponse.module = "Intents.INIntentResponse" external.UTType.module = "UniformTypeIdentifiers.UTType" external.CKContainer.module = "CloudKit.CKContainer" external.CKShare.module = "CloudKit.CKShare" @@ -125,6 +126,8 @@ class.UITraitImageDynamicRange.main-thread-only = true class.UITraitTypesettingLanguage.main-thread-only = true class.UITraitSceneCaptureState.main-thread-only = true class.UITraitListEnvironment.main-thread-only = true +class.UITraitSplitViewControllerLayoutEnvironment.main-thread-only = true +class.UITraitHDRHeadroomUsageLimit.main-thread-only = true # We don't really want objc2-ui-kit to depend on objc2-core-text class.NSAdaptiveImageGlyph.skipped-protocols = ["CTAdaptiveImageProviding"] diff --git a/framework-crates/objc2-video-subscriber-account/Cargo.toml b/framework-crates/objc2-video-subscriber-account/Cargo.toml index 29af684bd..ddeae3c88 100644 --- a/framework-crates/objc2-video-subscriber-account/Cargo.toml +++ b/framework-crates/objc2-video-subscriber-account/Cargo.toml @@ -45,6 +45,9 @@ default = [ "VSAccountMetadataRequest", "VSAccountProviderResponse", "VSAppleSubscription", + "VSAutoSignInAuthorization", + "VSAutoSignInToken", + "VSAutoSignInTokenUpdateContext", "VSSubscription", "VSSubscriptionRegistrationCenter", "VSUserAccount", @@ -82,6 +85,12 @@ VSAppleSubscription = [ "objc2-foundation/NSArray", "objc2-foundation/NSString", ] +VSAutoSignInAuthorization = [] +VSAutoSignInToken = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] +VSAutoSignInTokenUpdateContext = [] VSSubscription = [ "objc2-foundation/NSArray", "objc2-foundation/NSDate", diff --git a/framework-crates/objc2-video-toolbox/Cargo.toml b/framework-crates/objc2-video-toolbox/Cargo.toml index 674f585e7..4286fbed4 100644 --- a/framework-crates/objc2-video-toolbox/Cargo.toml +++ b/framework-crates/objc2-video-toolbox/Cargo.toml @@ -73,10 +73,16 @@ default = [ "VTFrameProcessorFrame", "VTFrameProcessorParameters", "VTFrameProcessor_FrameRateConversion", + "VTFrameProcessor_LowLatencyFrameInterpolation", + "VTFrameProcessor_LowLatencySuperResolutionScaler", "VTFrameProcessor_MotionBlur", "VTFrameProcessor_OpticalFlow", + "VTFrameProcessor_SuperResolutionScaler", + "VTFrameProcessor_TemporalNoiseFilter", "VTFrameSilo", "VTHDRPerFrameMetadataGenerationSession", + "VTMotionEstimationSession", + "VTMotionEstimationSessionProperties", "VTMultiPassStorage", "VTPixelRotationProperties", "VTPixelRotationSession", @@ -129,13 +135,22 @@ VTFrameProcessorErrors = [] VTFrameProcessorFrame = [] VTFrameProcessorParameters = [] VTFrameProcessor_FrameRateConversion = [] +VTFrameProcessor_LowLatencyFrameInterpolation = [] +VTFrameProcessor_LowLatencySuperResolutionScaler = [] VTFrameProcessor_MotionBlur = [] VTFrameProcessor_OpticalFlow = [] +VTFrameProcessor_SuperResolutionScaler = [] +VTFrameProcessor_TemporalNoiseFilter = [] VTFrameSilo = [ "objc2-core-foundation/CFDictionary", "objc2-core-foundation/CFURL", ] VTHDRPerFrameMetadataGenerationSession = ["objc2-core-foundation/CFDictionary"] +VTMotionEstimationSession = [ + "bitflags", + "objc2-core-foundation/CFDictionary", +] +VTMotionEstimationSessionProperties = [] VTMultiPassStorage = [ "objc2-core-foundation/CFDictionary", "objc2-core-foundation/CFURL", diff --git a/framework-crates/objc2-video-toolbox/src/lib.rs b/framework-crates/objc2-video-toolbox/src/lib.rs index 61f0970f7..fec02251e 100644 --- a/framework-crates/objc2-video-toolbox/src/lib.rs +++ b/framework-crates/objc2-video-toolbox/src/lib.rs @@ -24,6 +24,8 @@ pub use self::generated::*; pub(crate) type Boolean = u8; #[allow(dead_code)] pub(crate) type OSStatus = i32; +#[allow(dead_code)] +pub(crate) type OSType = u32; // NOTE: `VTRAWProcessingSessionRef` is marked as `CM_SWIFT_NONSENDABLE`, but // `$(xcrun --show-sdk-path)/usr/lib/swift/VideoToolbox.swiftmodule/*` diff --git a/framework-crates/objc2-virtualization/Cargo.toml b/framework-crates/objc2-virtualization/Cargo.toml index 8f171f4ff..5984f1ec3 100644 --- a/framework-crates/objc2-virtualization/Cargo.toml +++ b/framework-crates/objc2-virtualization/Cargo.toml @@ -163,6 +163,7 @@ default = [ "VZVirtualMachineDelegate", "VZVirtualMachineStartOptions", "VZVirtualMachineView", + "VZVmnetNetworkDeviceAttachment", "VZXHCIController", "VZXHCIControllerConfiguration", "bitflags", @@ -397,5 +398,6 @@ VZVirtualMachineView = [ "objc2-foundation/NSObject", "objc2-foundation/objc2-core-foundation", ] +VZVmnetNetworkDeviceAttachment = [] VZXHCIController = [] VZXHCIControllerConfiguration = ["objc2-foundation/NSObject"] diff --git a/framework-crates/objc2-virtualization/translation-config.toml b/framework-crates/objc2-virtualization/translation-config.toml index 9e7fe3c9b..4e84ac7e3 100644 --- a/framework-crates/objc2-virtualization/translation-config.toml +++ b/framework-crates/objc2-virtualization/translation-config.toml @@ -8,3 +8,7 @@ macos = "11.0" class.VZMACAddress.methods."initWithEthernetAddress:".skipped = true # Needs `ether_addr_t` class.VZMACAddress.methods.ethernetAddress.skipped = true + +# Needs `vmnet_network_ref` from `vmnet` +class.VZVmnetNetworkDeviceAttachment.methods."initWithNetwork:".skipped = true +class.VZVmnetNetworkDeviceAttachment.methods.network.skipped = true diff --git a/framework-crates/objc2-web-kit/Cargo.toml b/framework-crates/objc2-web-kit/Cargo.toml index 3c8bf5441..c2995f078 100644 --- a/framework-crates/objc2-web-kit/Cargo.toml +++ b/framework-crates/objc2-web-kit/Cargo.toml @@ -51,7 +51,6 @@ objc2-app-kit = { workspace = true, optional = true, features = [ "NSPrintInfo", "NSPrintOperation", "NSResponder", - "NSTextCheckingClient", "NSTextFinder", "NSTextView", "NSUserInterfaceItemIdentification", @@ -875,6 +874,7 @@ WKWebExtensionWindowConfiguration = [ "objc2-foundation/NSURL", ] WKWebView = [ + "bitflags", "objc2-foundation/NSArray", "objc2-foundation/NSCoder", "objc2-foundation/NSData", @@ -900,6 +900,7 @@ WKWebsiteDataRecord = [ ] WKWebsiteDataStore = [ "objc2-foundation/NSArray", + "objc2-foundation/NSData", "objc2-foundation/NSDate", "objc2-foundation/NSError", "objc2-foundation/NSObject", diff --git a/generated b/generated index c7737af1a..035995ee9 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit c7737af1a47c37162da008b0aca4a92ada686ecb +Subproject commit 035995ee9c7f1291ad4b653691fbe1532576ea6b From 9c5cbe7c225cf3a48a74bdfc71daaed1209a408e Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 3 Sep 2025 02:12:59 +0200 Subject: [PATCH 02/10] Update to Xcode 26 Beta 2 --- crates/header-translator/configs/skipped.toml | 4 +--- crates/objc2/src/topics/frameworks_list_unsupported.md | 3 +-- framework-crates/objc2-accessory-setup-kit/Cargo.toml | 5 +---- framework-crates/objc2-app-kit/Cargo.toml | 4 ++++ framework-crates/objc2-av-foundation/Cargo.toml | 1 + framework-crates/objc2-car-play/Cargo.toml | 2 +- framework-crates/objc2-game-controller/Cargo.toml | 2 -- framework-crates/objc2-health-kit/Cargo.toml | 1 - framework-crates/objc2-metal/Cargo.toml | 9 ++------- .../objc2-sensitive-content-analysis/Cargo.toml | 5 ++--- framework-crates/objc2-speech/Cargo.toml | 1 + generated | 2 +- 12 files changed, 15 insertions(+), 24 deletions(-) diff --git a/crates/header-translator/configs/skipped.toml b/crates/header-translator/configs/skipped.toml index b503a54c1..d6830575c 100644 --- a/crates/header-translator/configs/skipped.toml +++ b/crates/header-translator/configs/skipped.toml @@ -144,9 +144,7 @@ DeviceDiscoveryUI = "Needs Network first" BrowserKit = "TODO" SecurityUI = "TODO" GameSave = "TODO" -TouchControls = "TODO" - -MeshNetFramework = "Weirdly incomplete" +TouchController = "TODO" # LiveExecutionResultsLogger = "Removed in Xcode 26" # AGL = "Removed in Xcode 26" diff --git a/crates/objc2/src/topics/frameworks_list_unsupported.md b/crates/objc2/src/topics/frameworks_list_unsupported.md index dd250fcef..222ed820f 100644 --- a/crates/objc2/src/topics/frameworks_list_unsupported.md +++ b/crates/objc2/src/topics/frameworks_list_unsupported.md @@ -77,7 +77,6 @@ | `Matter` | Mostly available [here](https://github.com/project-chip/connectedhomeip). | | `MatterSupport` | Swift-only. | | `MediaLibrary` | Deprecated, use PhotoKit instead. | -| `MeshNetFramework` | Weirdly incomplete. | | `Message` | Basically empty. | | `MetalPerformancePrimitives` | Header-only framework used in Metal shaders. | | `MobileCoreServices` | Deprecated, use CoreServices + UniformTypeIdentifiers instead. | @@ -116,7 +115,7 @@ | `Testing` | Swift-only. | | `TipKit` | Swift-only. | | `Tk` | Very C-centric and old. | -| `TouchControls` | TODO. | +| `TouchController` | TODO. | | `Translation` | Swift-only. | | `TranslationUIProvider` | Swift-only. | | `Twitter` | Deprecated, use Social instead. | diff --git a/framework-crates/objc2-accessory-setup-kit/Cargo.toml b/framework-crates/objc2-accessory-setup-kit/Cargo.toml index c1a38b2ef..907163bc1 100644 --- a/framework-crates/objc2-accessory-setup-kit/Cargo.toml +++ b/framework-crates/objc2-accessory-setup-kit/Cargo.toml @@ -77,10 +77,7 @@ ASAccessorySettings = [ "objc2-foundation/NSData", "objc2-foundation/NSString", ] -ASCommon = [ - "objc2-foundation/NSObject", - "objc2-foundation/NSString", -] +ASCommon = ["objc2-foundation/NSString"] ASDiscoveryDescriptor = [ "objc2-foundation/NSData", "objc2-foundation/NSString", diff --git a/framework-crates/objc2-app-kit/Cargo.toml b/framework-crates/objc2-app-kit/Cargo.toml index fd696f871..0e0bfad2d 100644 --- a/framework-crates/objc2-app-kit/Cargo.toml +++ b/framework-crates/objc2-app-kit/Cargo.toml @@ -206,6 +206,7 @@ default = [ "NSInputManager", "NSInputServer", "NSInterfaceStyle", + "NSItemBadge", "NSItemProvider", "NSKeyValueBinding", "NSLayoutAnchor", @@ -355,6 +356,7 @@ default = [ "NSTextView", "NSTextViewportLayoutController", "NSTintConfiguration", + "NSTintProminence", "NSTitlebarAccessoryViewController", "NSTokenField", "NSTokenFieldCell", @@ -1149,6 +1151,7 @@ NSInputServer = [ "objc2-foundation/objc2-core-foundation", ] NSInterfaceStyle = ["objc2-foundation/NSString"] +NSItemBadge = ["objc2-foundation/NSString"] NSItemProvider = [ "objc2-foundation/NSGeometry", "objc2-foundation/NSItemProvider", @@ -2141,6 +2144,7 @@ NSTextView = [ ] NSTextViewportLayoutController = [] NSTintConfiguration = ["objc2-foundation/NSObject"] +NSTintProminence = [] NSTitlebarAccessoryViewController = [ "objc2-foundation/NSBundle", "objc2-foundation/NSCoder", diff --git a/framework-crates/objc2-av-foundation/Cargo.toml b/framework-crates/objc2-av-foundation/Cargo.toml index 8e25f4f31..830b718b0 100644 --- a/framework-crates/objc2-av-foundation/Cargo.toml +++ b/framework-crates/objc2-av-foundation/Cargo.toml @@ -807,6 +807,7 @@ AVSampleBufferRenderSynchronizer = [ "objc2-foundation/NSValue", ] AVSampleBufferVideoRenderer = [ + "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSNotification", "objc2-foundation/NSString", diff --git a/framework-crates/objc2-car-play/Cargo.toml b/framework-crates/objc2-car-play/Cargo.toml index 03bdf6ec4..4ff49a587 100644 --- a/framework-crates/objc2-car-play/Cargo.toml +++ b/framework-crates/objc2-car-play/Cargo.toml @@ -229,7 +229,7 @@ CPListImageRowItemCardElement = ["objc2-foundation/NSString"] CPListImageRowItemCondensedElement = ["objc2-foundation/NSString"] CPListImageRowItemElement = [] CPListImageRowItemGridElement = [] -CPListImageRowItemImageGridElement = [] +CPListImageRowItemImageGridElement = ["objc2-foundation/NSString"] CPListImageRowItemRowElement = ["objc2-foundation/NSString"] CPListItem = ["objc2-foundation/NSString"] CPListItemTypes = ["objc2-foundation/NSString"] diff --git a/framework-crates/objc2-game-controller/Cargo.toml b/framework-crates/objc2-game-controller/Cargo.toml index 326f384df..a9c13bc43 100644 --- a/framework-crates/objc2-game-controller/Cargo.toml +++ b/framework-crates/objc2-game-controller/Cargo.toml @@ -107,7 +107,6 @@ default = [ "GCRacingWheel", "GCRacingWheelInput", "GCRelativeInput", - "GCSpatialAccessory", "GCSteeringWheelElement", "GCStylus", "GCSwitchElement", @@ -234,7 +233,6 @@ GCRelativeInput = [ "objc2-foundation/NSDate", "objc2-foundation/NSSet", ] -GCSpatialAccessory = [] GCSteeringWheelElement = [] GCStylus = [ "objc2-foundation/NSArray", diff --git a/framework-crates/objc2-health-kit/Cargo.toml b/framework-crates/objc2-health-kit/Cargo.toml index 376fe957c..99e2b7cf4 100644 --- a/framework-crates/objc2-health-kit/Cargo.toml +++ b/framework-crates/objc2-health-kit/Cargo.toml @@ -584,6 +584,5 @@ HKWorkoutSession = [ "objc2-foundation/NSDictionary", "objc2-foundation/NSError", "objc2-foundation/NSObject", - "objc2-foundation/NSSet", "objc2-foundation/NSString", ] diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml index fd0104fe3..80ca7e836 100644 --- a/framework-crates/objc2-metal/Cargo.toml +++ b/framework-crates/objc2-metal/Cargo.toml @@ -54,6 +54,7 @@ default = [ "MTL4ArgumentTable", "MTL4BinaryFunction", "MTL4BinaryFunctionDescriptor", + "MTL4BufferRange", "MTL4CommandAllocator", "MTL4CommandBuffer", "MTL4CommandEncoder", @@ -67,7 +68,6 @@ default = [ "MTL4FunctionDescriptor", "MTL4LibraryDescriptor", "MTL4LibraryFunctionDescriptor", - "MTL4LinkedFunctions", "MTL4LinkingDescriptor", "MTL4MachineLearningCommandEncoder", "MTL4MachineLearningPipeline", @@ -179,6 +179,7 @@ MTL4BinaryFunctionDescriptor = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +MTL4BufferRange = [] MTL4CommandAllocator = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", @@ -224,12 +225,6 @@ MTL4LibraryFunctionDescriptor = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -MTL4LinkedFunctions = [ - "objc2-foundation/NSArray", - "objc2-foundation/NSDictionary", - "objc2-foundation/NSObject", - "objc2-foundation/NSString", -] MTL4LinkingDescriptor = [ "objc2-foundation/NSArray", "objc2-foundation/NSDictionary", diff --git a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml index 7096b9aae..7426d2324 100644 --- a/framework-crates/objc2-sensitive-content-analysis/Cargo.toml +++ b/framework-crates/objc2-sensitive-content-analysis/Cargo.toml @@ -50,7 +50,7 @@ default = [ "std", "SCSensitivityAnalysis", "SCSensitivityAnalyzer", - "SCVideoStreamAnalyzer_Public", + "SCVideoStreamAnalyzer", "block2", "objc2-av-foundation", "objc2-core-graphics", @@ -71,8 +71,7 @@ SCSensitivityAnalyzer = [ "objc2-foundation/NSProgress", "objc2-foundation/NSURL", ] -SCVideoStreamAnalyzer_Public = [ +SCVideoStreamAnalyzer = [ "objc2-foundation/NSError", - "objc2-foundation/NSObject", "objc2-foundation/NSString", ] diff --git a/framework-crates/objc2-speech/Cargo.toml b/framework-crates/objc2-speech/Cargo.toml index 6ebd1e1ca..4edecd6c1 100644 --- a/framework-crates/objc2-speech/Cargo.toml +++ b/framework-crates/objc2-speech/Cargo.toml @@ -72,6 +72,7 @@ SFSpeechLanguageModel = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", "objc2-foundation/NSURL", + "objc2-foundation/NSValue", ] SFSpeechRecognitionMetadata = [ "objc2-foundation/NSDate", diff --git a/generated b/generated index 035995ee9..0d4f37127 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 035995ee9c7f1291ad4b653691fbe1532576ea6b +Subproject commit 0d4f37127556315a027ab7dac6425c4531664160 From b3f08266b28a99bfe2b06c9888f6564ddec034bf Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 3 Sep 2025 02:07:41 +0200 Subject: [PATCH 03/10] Update to Xcode 26 Beta 3 --- crates/header-translator/src/unexposed_attr.rs | 1 + framework-crates/objc2-application-services/Cargo.toml | 2 ++ framework-crates/objc2-av-foundation/Cargo.toml | 7 +++++++ framework-crates/objc2-browser-engine-kit/Cargo.toml | 2 ++ framework-crates/objc2-core-graphics/Cargo.toml | 2 -- framework-crates/objc2-game-kit/Cargo.toml | 8 +++++++- framework-crates/objc2-metal/Cargo.toml | 2 ++ framework-crates/objc2-ui-kit/translation-config.toml | 1 + generated | 2 +- 9 files changed, 23 insertions(+), 4 deletions(-) diff --git a/crates/header-translator/src/unexposed_attr.rs b/crates/header-translator/src/unexposed_attr.rs index effb536c1..999ec35c7 100644 --- a/crates/header-translator/src/unexposed_attr.rs +++ b/crates/header-translator/src/unexposed_attr.rs @@ -180,6 +180,7 @@ impl UnexposedAttr { | "API_DEPRECATED" | "API_DEPRECATED_BEGIN" | "API_DEPRECATED_WITH_REPLACEMENT" + | "API_OBSOLETED" | "API_UNAVAILABLE_BEGIN" | "API_UNAVAILABLE" | "AUGRAPH_DEPRECATED" diff --git a/framework-crates/objc2-application-services/Cargo.toml b/framework-crates/objc2-application-services/Cargo.toml index 269787cee..3487b834d 100644 --- a/framework-crates/objc2-application-services/Cargo.toml +++ b/framework-crates/objc2-application-services/Cargo.toml @@ -65,6 +65,7 @@ default = [ "AXUIElement", "AXValue", "AXValueConstants", + "AXWebConstants", "Accessibility", "HIServices", "HIShape", @@ -118,6 +119,7 @@ AXUIElement = [ ] AXValue = [] AXValueConstants = [] +AXWebConstants = [] Accessibility = [] HIServices = [] HIShape = ["objc2-core-foundation/CFCGTypes"] diff --git a/framework-crates/objc2-av-foundation/Cargo.toml b/framework-crates/objc2-av-foundation/Cargo.toml index 830b718b0..2347cf7cf 100644 --- a/framework-crates/objc2-av-foundation/Cargo.toml +++ b/framework-crates/objc2-av-foundation/Cargo.toml @@ -244,6 +244,7 @@ default = [ "AVSampleBufferVideoRenderer", "AVSampleCursor", "AVSemanticSegmentationMatte", + "AVSpatialVideoConfiguration", "AVSynchronizedLayer", "AVTextStyleRule", "AVTime", @@ -823,6 +824,12 @@ AVSemanticSegmentationMatte = [ "objc2-foundation/NSError", "objc2-foundation/NSString", ] +AVSpatialVideoConfiguration = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDictionary", + "objc2-foundation/NSString", + "objc2-foundation/NSValue", +] AVSynchronizedLayer = ["objc2-foundation/NSObject"] AVTextStyleRule = [ "objc2-foundation/NSArray", diff --git a/framework-crates/objc2-browser-engine-kit/Cargo.toml b/framework-crates/objc2-browser-engine-kit/Cargo.toml index 77d99b07f..9b106c727 100644 --- a/framework-crates/objc2-browser-engine-kit/Cargo.toml +++ b/framework-crates/objc2-browser-engine-kit/Cargo.toml @@ -43,6 +43,7 @@ default = [ "std", "BEAccessibility", "BEAccessibilityConstants", + "BEAccessibilityRemoteElement", "BEAccessibilityTextMarker", "BEAutoFillTextSuggestion", "BECapability", @@ -96,6 +97,7 @@ BEAccessibility = [ "objc2-foundation/NSString", ] BEAccessibilityConstants = ["objc2-ui-kit/UIAccessibilityConstants"] +BEAccessibilityRemoteElement = ["objc2-foundation/NSString"] BEAccessibilityTextMarker = [ "objc2-foundation/NSObject", "objc2-foundation/NSRange", diff --git a/framework-crates/objc2-core-graphics/Cargo.toml b/framework-crates/objc2-core-graphics/Cargo.toml index 7aed15891..4dc96af6c 100644 --- a/framework-crates/objc2-core-graphics/Cargo.toml +++ b/framework-crates/objc2-core-graphics/Cargo.toml @@ -83,7 +83,6 @@ default = [ "CGPDFScanner", "CGPDFStream", "CGPDFString", - "CGPDFWrappedObject", "CGPSConverter", "CGPath", "CGPattern", @@ -226,7 +225,6 @@ CGPDFPage = ["objc2-core-foundation/CFCGTypes"] CGPDFScanner = ["objc2-core-foundation/CFCGTypes"] CGPDFStream = ["objc2-core-foundation/CFData"] CGPDFString = ["objc2-core-foundation/CFDate"] -CGPDFWrappedObject = ["objc2-core-foundation/CFCGTypes"] CGPSConverter = ["objc2-core-foundation/CFDictionary"] CGPath = [ "objc2-core-foundation/CFArray", diff --git a/framework-crates/objc2-game-kit/Cargo.toml b/framework-crates/objc2-game-kit/Cargo.toml index 6c84ac3be..31d1d30de 100644 --- a/framework-crates/objc2-game-kit/Cargo.toml +++ b/framework-crates/objc2-game-kit/Cargo.toml @@ -133,7 +133,10 @@ GKAchievementViewController = [ "objc2-foundation/NSCoder", "objc2-foundation/NSObject", ] -GKBasePlayer = ["objc2-foundation/NSString"] +GKBasePlayer = [ + "objc2-foundation/NSObject", + "objc2-foundation/NSString", +] GKChallenge = [ "objc2-foundation/NSArray", "objc2-foundation/NSDate", @@ -155,6 +158,7 @@ GKChallengesViewController = [ ] GKCloudPlayer = [ "objc2-foundation/NSError", + "objc2-foundation/NSObject", "objc2-foundation/NSString", ] GKDefines = [ @@ -244,6 +248,7 @@ GKLocalPlayer = [ "objc2-foundation/NSData", "objc2-foundation/NSError", "objc2-foundation/NSNotification", + "objc2-foundation/NSObject", "objc2-foundation/NSString", "objc2-foundation/NSURL", ] @@ -278,6 +283,7 @@ GKPlayer = [ "objc2-foundation/NSArray", "objc2-foundation/NSError", "objc2-foundation/NSNotification", + "objc2-foundation/NSObject", "objc2-foundation/NSString", ] GKPublicConstants = ["objc2-foundation/NSString"] diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml index 80ca7e836..b3be384b8 100644 --- a/framework-crates/objc2-metal/Cargo.toml +++ b/framework-crates/objc2-metal/Cargo.toml @@ -113,6 +113,7 @@ default = [ "MTLFunctionHandle", "MTLFunctionLog", "MTLFunctionStitching", + "MTLGPUAddress", "MTLHeap", "MTLIOCommandBuffer", "MTLIOCommandQueue", @@ -395,6 +396,7 @@ MTLFunctionStitching = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] +MTLGPUAddress = [] MTLHeap = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", diff --git a/framework-crates/objc2-ui-kit/translation-config.toml b/framework-crates/objc2-ui-kit/translation-config.toml index 9a93a42c0..7226647c5 100644 --- a/framework-crates/objc2-ui-kit/translation-config.toml +++ b/framework-crates/objc2-ui-kit/translation-config.toml @@ -128,6 +128,7 @@ class.UITraitSceneCaptureState.main-thread-only = true class.UITraitListEnvironment.main-thread-only = true class.UITraitSplitViewControllerLayoutEnvironment.main-thread-only = true class.UITraitHDRHeadroomUsageLimit.main-thread-only = true +class.UITraitResolvesNaturalAlignmentWithBaseWritingDirection.main-thread-only = true # We don't really want objc2-ui-kit to depend on objc2-core-text class.NSAdaptiveImageGlyph.skipped-protocols = ["CTAdaptiveImageProviding"] diff --git a/generated b/generated index 0d4f37127..c78f8d6a9 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 0d4f37127556315a027ab7dac6425c4531664160 +Subproject commit c78f8d6a925a2bbfe598b280c571d8a79c1aeb43 From f856bfd1057818d2c9e4004519156effa162dde6 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Wed, 23 Jul 2025 21:40:34 +0200 Subject: [PATCH 04/10] Update to Xcode 26 Beta 4 --- crates/header-translator/src/unexposed_attr.rs | 2 ++ framework-crates/objc2-ui-kit/Cargo.toml | 5 +++++ generated | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/header-translator/src/unexposed_attr.rs b/crates/header-translator/src/unexposed_attr.rs index 999ec35c7..33a921325 100644 --- a/crates/header-translator/src/unexposed_attr.rs +++ b/crates/header-translator/src/unexposed_attr.rs @@ -181,6 +181,7 @@ impl UnexposedAttr { | "API_DEPRECATED_BEGIN" | "API_DEPRECATED_WITH_REPLACEMENT" | "API_OBSOLETED" + | "API_OBSOLETED_WITH_REPLACEMENT" | "API_UNAVAILABLE_BEGIN" | "API_UNAVAILABLE" | "AUGRAPH_DEPRECATED" @@ -336,6 +337,7 @@ impl UnexposedAttr { | "BROWSERENGINE_TEXTINPUT_AVAILABILITY" | "BROWSERENGINE_ACCESSIBILITY_AVAILABILITY" | "BROWSERENGINE_ACCESSIBILITY_MARKER_AVAILABILITY" + | "BROWSERENGINE_ACCESSIBILITY_REMOTE_AVAILABILITY" | "CA_CANONICAL_DEPRECATED" | "CB_CM_API_AVAILABLE" | "CF_AUTOMATED_REFCOUNT_UNAVAILABLE" diff --git a/framework-crates/objc2-ui-kit/Cargo.toml b/framework-crates/objc2-ui-kit/Cargo.toml index ad97efa62..5e2439839 100644 --- a/framework-crates/objc2-ui-kit/Cargo.toml +++ b/framework-crates/objc2-ui-kit/Cargo.toml @@ -208,6 +208,8 @@ default = [ "UIControl", "UIConversationContext", "UIConversationEntry", + "UICornerConfiguration", + "UICornerRadius", "UIDataDetectors", "UIDataSourceTranslating", "UIDatePicker", @@ -1094,6 +1096,8 @@ UIConversationEntry = [ "objc2-foundation/NSSet", "objc2-foundation/NSString", ] +UICornerConfiguration = ["objc2-foundation/NSObject"] +UICornerRadius = ["objc2-foundation/NSObject"] UIDataDetectors = ["bitflags"] UIDataSourceTranslating = ["objc2-foundation/NSIndexPath"] UIDatePicker = [ @@ -1784,6 +1788,7 @@ UISearchBar = [ "objc2-foundation/NSObject", "objc2-foundation/NSRange", "objc2-foundation/NSString", + "objc2-foundation/NSValue", ] UISearchContainerViewController = [ "objc2-foundation/NSBundle", diff --git a/generated b/generated index c78f8d6a9..5e74acdd9 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit c78f8d6a925a2bbfe598b280c571d8a79c1aeb43 +Subproject commit 5e74acdd922cf39be5d85f8a9297b78112c6ff7e From 8da1012d34f187eb8d75ce9bf8c67d65b02601ab Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Fri, 12 Sep 2025 00:20:17 +0200 Subject: [PATCH 05/10] Update to Xcode 26 Beta 5 --- Cargo.lock | 2 ++ framework-crates/objc2-app-kit/Cargo.toml | 5 +++++ .../objc2-metal-performance-shaders-graph/Cargo.toml | 4 ++++ framework-crates/objc2-pencil-kit/Cargo.toml | 6 ++++++ generated | 2 +- 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index b31bbdb46..344dc5676 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2191,6 +2191,7 @@ dependencies = [ name = "objc2-metal-performance-shaders-graph" version = "0.3.1" dependencies = [ + "bitflags", "block2", "dispatch2", "objc2", @@ -2379,6 +2380,7 @@ dependencies = [ "objc2", "objc2-app-kit", "objc2-core-foundation", + "objc2-core-graphics", "objc2-foundation", ] diff --git a/framework-crates/objc2-app-kit/Cargo.toml b/framework-crates/objc2-app-kit/Cargo.toml index 0e0bfad2d..2af95e48d 100644 --- a/framework-crates/objc2-app-kit/Cargo.toml +++ b/framework-crates/objc2-app-kit/Cargo.toml @@ -380,6 +380,7 @@ default = [ "NSUserInterfaceValidation", "NSView", "NSViewController", + "NSViewLayoutRegion", "NSVisualEffectView", "NSWindow", "NSWindowController", @@ -2295,6 +2296,10 @@ NSViewController = [ "objc2-foundation/NSString", "objc2-foundation/objc2-core-foundation", ] +NSViewLayoutRegion = [ + "objc2-foundation/NSGeometry", + "objc2-foundation/objc2-core-foundation", +] NSVisualEffectView = [ "objc2-foundation/NSCoder", "objc2-foundation/NSGeometry", diff --git a/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml b/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml index 87395a0f7..8bfb57768 100644 --- a/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml +++ b/framework-crates/objc2-metal-performance-shaders-graph/Cargo.toml @@ -16,6 +16,7 @@ license.workspace = true workspace = true [dependencies] +bitflags = { workspace = true, optional = true, features = ["std"] } block2 = { workspace = true, optional = true, features = ["alloc"] } dispatch2 = { workspace = true, optional = true, features = [ "alloc", @@ -90,17 +91,20 @@ default = [ "MPSGraphTensorData", "MPSGraphTensorShapeOps", "MPSGraphTopKOps", + "bitflags", "block2", "dispatch2", "objc2-metal-performance-shaders", ] std = ["alloc"] alloc = [] +bitflags = ["dep:bitflags"] block2 = ["dep:block2"] dispatch2 = ["dep:dispatch2"] objc2-metal-performance-shaders = ["dep:objc2-metal-performance-shaders"] MPSGraph = [ + "bitflags", "objc2-foundation/NSArray", "objc2-foundation/NSDictionary", "objc2-foundation/NSError", diff --git a/framework-crates/objc2-pencil-kit/Cargo.toml b/framework-crates/objc2-pencil-kit/Cargo.toml index 7ae168f2c..93c8cd780 100644 --- a/framework-crates/objc2-pencil-kit/Cargo.toml +++ b/framework-crates/objc2-pencil-kit/Cargo.toml @@ -22,6 +22,10 @@ objc2-core-foundation = { workspace = true, optional = true, features = [ "CFCGTypes", "objc2", ] } +objc2-core-graphics = { workspace = true, optional = true, features = [ + "CGColor", + "objc2", +] } objc2-foundation = { workspace = true, features = ["alloc"] } [target.'cfg(target_os = "macos")'.dependencies] @@ -63,12 +67,14 @@ default = [ "block2", "objc2-app-kit", "objc2-core-foundation", + "objc2-core-graphics", ] std = ["alloc"] alloc = [] block2 = ["dep:block2"] objc2-app-kit = ["dep:objc2-app-kit"] objc2-core-foundation = ["dep:objc2-core-foundation"] +objc2-core-graphics = ["dep:objc2-core-graphics"] PKContentVersion = [] PKDrawing = [ diff --git a/generated b/generated index 5e74acdd9..1c36370d7 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 5e74acdd922cf39be5d85f8a9297b78112c6ff7e +Subproject commit 1c36370d7788344cef5d2c00cebec191d6e8706c From 60f34cce595aea63593b36a42acd5494d8ae6bd9 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 19 Aug 2025 10:13:20 +0200 Subject: [PATCH 06/10] Update to Xcode 26 Beta 6 --- generated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated b/generated index 1c36370d7..9b800d0c6 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 1c36370d7788344cef5d2c00cebec191d6e8706c +Subproject commit 9b800d0c6440dfed621ce3fd8a4422f975700686 From 9e7c6afc7980d476e6cef2eb31f601638635fb3a Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 3 Sep 2025 01:59:28 +0200 Subject: [PATCH 07/10] Update to Xcode 26 Beta 7 --- generated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated b/generated index 9b800d0c6..b7bbb3dc4 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 9b800d0c6440dfed621ce3fd8a4422f975700686 +Subproject commit b7bbb3dc45b933f0453b13a827002a70c39533df From 531c17060d09bea26f143be1679e1df7056af2ba Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Wed, 3 Sep 2025 05:42:14 +0200 Subject: [PATCH 08/10] Note breaking changes, and avoid a few of the larger ones --- .../objc2/src/topics/FRAMEWORKS_CHANGELOG.md | 40 +++++++- .../objc2-core-graphics/src/bitmap_context.rs | 92 +++++++++++++++++++ .../objc2-core-graphics/src/lib.rs | 5 + .../translation-config.toml | 4 + .../objc2-core-video/translation-config.toml | 4 + .../objc2-metal/Cargo.modified.toml | 42 +++++++++ framework-crates/objc2-metal/Cargo.toml | 68 ++++++++------ .../objc2-ui-kit/Cargo.modified.toml | 16 ++++ framework-crates/objc2-ui-kit/Cargo.toml | 24 ++--- generated | 2 +- 10 files changed, 256 insertions(+), 41 deletions(-) create mode 100644 framework-crates/objc2-core-graphics/src/bitmap_context.rs diff --git a/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md b/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md index ab4800b8c..3f3954c3c 100644 --- a/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md +++ b/crates/objc2/src/topics/FRAMEWORKS_CHANGELOG.md @@ -37,16 +37,54 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * **BREAKING**: The reply block in `FSVolumeRenameOperations::setVolumeName_replyHandler` now takes a nullable file name. * **BREAKING**: The media selection option on `AVAssetVariantQualifier` is now nullable. +* **BREAKING**: Moved various `AVFAudio` types from the `AVAudioSession` feature flag to + `AVAudioSessionTypes`. +* **BREAKING**: Moved various `HealthKit` types from the `HKMetadata` feature flag to + `HKMedicationConcept` or `HKMetadataEnums`. +* **BREAKING**: Marked a bunch of classes and protocols in `objc2-car-play` as `MainThreadOnly`. +* **BREAKING**: Marked `NSUndoManager` as `MainThreadOnly`. +* **BREAKING**: Marked the following types as no longer `MainThreadOnly`: + - `UIEditMenuInteractionDelegate`. + - `UIPrintPaper`. + - `UIPrintPageRenderer`. + - `UIPrintFormatter`. + - `UISimpleTextPrintFormatter`. + - `UIMarkupTextPrintFormatter`. + - `UIViewPrintFormatter`. +* **BREAKING**: Split methods from `MTLFX*Scaler` into subprotocol `MTLFX*ScalerBase`. +* **BREAKING**: Renamed `VTFrameProcessorConfiguration::processorSupported` to `isSupported`. +* **BREAKING**: Changed the return type of `VTFrameProcessorConfiguration::sourcePixelBufferAttributes` + and `destinationPixelBufferAttributes`. + +### Removed +* **BREAKING**: Removed the following APIs: + - `ARQuickLookPreviewItem`. + - `NSControl::mouseDown` (still present on the superclass `NSResponder`). + - `CPListImageRowItem::setImageTitles`. + - `UIFocusUpdateContext::previouslyFocusedView`. + - `UIFocusUpdateContext::nextFocusedView`. + - `UIFocusSystem::registerURL_forSoundIdentifier`. + - `UIWindowScene::focusSystem`. + - `WKWebViewConfiguration::writingToolsBehavior` and setter. + - `IOUSBHostPortTypeCount`. + - `kUSBHostPortPropertyMux`. + - `kUSBHostControllerPropertyMuxEnabled`. + - `kUSBHostControllerPropertyRevision`. ### Fixed * **BREAKING**: Fixed structs with packed alignment by marking them `#[repr(packed(...))]`. -* **BREAKING**: Fixed a few `MXMetricManager` methods that were instance methods instead of class methods. +* **BREAKING**: Fixed a few `MXMetricManager` methods that were instance methods instead of class + methods. * Fixed missing deprecations on statics, type aliases and some impls blocks. * **BREAKING**: Fixed some protocols not being marked `Send + Sync` even when they should be. + In particular a bunch of Metal protocols like `MTLDevice` and `MTLLibrary`. + This might break if you were implementing these yourself, in that case you should make your implementee `Send + Sync` as well. * Marked some CoreMedia types as `Send + Sync`. +* Fixed the value of `kUSBHostPortPropertyPortNumber`. +* Fixed the value of `SFSpeechErrorCode::Timeout`. ## [0.3.1] - 2025-04-19 [0.3.1]: https://github.com/madsmtm/objc2/compare/frameworks-0.3.0...frameworks-0.3.1 diff --git a/framework-crates/objc2-core-graphics/src/bitmap_context.rs b/framework-crates/objc2-core-graphics/src/bitmap_context.rs new file mode 100644 index 000000000..25168ea5a --- /dev/null +++ b/framework-crates/objc2-core-graphics/src/bitmap_context.rs @@ -0,0 +1,92 @@ +#![allow(warnings, clippy)] +use core::ffi::c_void; +use core::ptr::NonNull; +use objc2_core_foundation::*; + +use crate::*; + +/// # Safety +/// +/// - `data` must be a valid pointer or null. +/// - `release_callback` must be implemented correctly. +/// - `release_info` must be a valid pointer or null. +#[cfg(all(feature = "CGColorSpace", feature = "CGContext", feature = "CGImage"))] +#[inline] +pub unsafe extern "C-unwind" fn CGBitmapContextCreateWithData( + data: *mut c_void, + width: usize, + height: usize, + bits_per_component: usize, + bytes_per_row: usize, + space: Option<&CGColorSpace>, + bitmap_info: u32, + release_callback: CGBitmapContextReleaseDataCallback, + release_info: *mut c_void, +) -> Option> { + extern "C-unwind" { + fn CGBitmapContextCreateWithData( + data: *mut c_void, + width: usize, + height: usize, + bits_per_component: usize, + bytes_per_row: usize, + space: Option<&CGColorSpace>, + bitmap_info: u32, + release_callback: CGBitmapContextReleaseDataCallback, + release_info: *mut c_void, + ) -> Option>; + } + let ret = unsafe { + CGBitmapContextCreateWithData( + data, + width, + height, + bits_per_component, + bytes_per_row, + space, + bitmap_info, + release_callback, + release_info, + ) + }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} + +/// # Safety +/// +/// `data` must be a valid pointer or null. +#[cfg(all(feature = "CGColorSpace", feature = "CGContext", feature = "CGImage"))] +#[inline] +pub unsafe extern "C-unwind" fn CGBitmapContextCreate( + data: *mut c_void, + width: usize, + height: usize, + bits_per_component: usize, + bytes_per_row: usize, + space: Option<&CGColorSpace>, + bitmap_info: u32, +) -> Option> { + extern "C-unwind" { + fn CGBitmapContextCreate( + data: *mut c_void, + width: usize, + height: usize, + bits_per_component: usize, + bytes_per_row: usize, + space: Option<&CGColorSpace>, + bitmap_info: u32, + ) -> Option>; + } + let ret = unsafe { + CGBitmapContextCreate( + data, + width, + height, + bits_per_component, + bytes_per_row, + space, + bitmap_info, + ) + }; + ret.map(|ret| unsafe { CFRetained::from_raw(ret) }) +} diff --git a/framework-crates/objc2-core-graphics/src/lib.rs b/framework-crates/objc2-core-graphics/src/lib.rs index 79a6ed14f..caf614893 100644 --- a/framework-crates/objc2-core-graphics/src/lib.rs +++ b/framework-crates/objc2-core-graphics/src/lib.rs @@ -15,10 +15,15 @@ extern crate alloc; #[cfg(feature = "std")] extern crate std; +#[cfg(feature = "CGBitmapContext")] +mod bitmap_context; mod generated; #[cfg(feature = "CGImage")] mod image; mod thread_safety; +#[cfg(feature = "CGBitmapContext")] +#[allow(unused_imports, unreachable_pub)] +pub use self::bitmap_context::*; #[allow(unused_imports, unreachable_pub)] pub use self::generated::*; diff --git a/framework-crates/objc2-core-graphics/translation-config.toml b/framework-crates/objc2-core-graphics/translation-config.toml index f9b8147e8..dce5cb41f 100644 --- a/framework-crates/objc2-core-graphics/translation-config.toml +++ b/framework-crates/objc2-core-graphics/translation-config.toml @@ -72,3 +72,7 @@ fn.CGColorSpaceGetName.renamed = "get_name" # Conflicts with `CGColorSpaceGetBaseColorSpace`. fn.CGColorSpaceCopyBaseColorSpace.renamed = "copy_base_color_space" + +# TODO(breaking): Has better typed parameter. +fn.CGBitmapContextCreateWithData.skipped = true +fn.CGBitmapContextCreate.skipped = true diff --git a/framework-crates/objc2-core-video/translation-config.toml b/framework-crates/objc2-core-video/translation-config.toml index 793df3fda..09941f1c8 100644 --- a/framework-crates/objc2-core-video/translation-config.toml +++ b/framework-crates/objc2-core-video/translation-config.toml @@ -36,3 +36,7 @@ fn.CVPixelBufferGetTypeID.unsafe = false # Naming conflicts with the newer Copy variants. fn.CVBufferGetAttachment.renamed = "get_attachment" fn.CVBufferGetAttachments.renamed = "get_attachments" + +# TODO(breaking): Make these nonnull +static.kCVImageBufferPostDecodeProcessingSequenceMetadataKey.nullability = "nullable" +static.kCVImageBufferPostDecodeProcessingFrameMetadataKey.nullability = "nullable" diff --git a/framework-crates/objc2-metal/Cargo.modified.toml b/framework-crates/objc2-metal/Cargo.modified.toml index a32565be0..d37ffce9b 100644 --- a/framework-crates/objc2-metal/Cargo.modified.toml +++ b/framework-crates/objc2-metal/Cargo.modified.toml @@ -7,3 +7,45 @@ unstable-private = [ "objc2-foundation/NSString", "objc2-foundation/NSError", ] + +# TODO(breaking): Remove these workarounds. +MTLAccelerationStructureCommandEncoder = [ + "objc2-foundation/NSObject", + "MTLAccelerationStructure", +] +MTLArgument = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSString", + "MTLDataType", +] +MTLStageInputOutputDescriptor = [ + "objc2-foundation/NSObject", + "MTLArgument", +] +MTLComputePipeline = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "MTLAllocation", +] +MTLRenderPipeline = [ + "bitflags", + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "MTLAllocation", +] +MTLDevice = [ + "bitflags", + "objc2-foundation/NSArray", + "objc2-foundation/NSBundle", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", + "MTLLibrary", + "MTLResource", + "MTLGPUAddress", +] diff --git a/framework-crates/objc2-metal/Cargo.toml b/framework-crates/objc2-metal/Cargo.toml index b3be384b8..a2be4cbc1 100644 --- a/framework-crates/objc2-metal/Cargo.toml +++ b/framework-crates/objc2-metal/Cargo.toml @@ -155,6 +155,46 @@ unstable-private = [ "objc2-foundation/NSString", "objc2-foundation/NSError", ] +MTLAccelerationStructureCommandEncoder = [ + "objc2-foundation/NSObject", + "MTLAccelerationStructure", +] +MTLArgument = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSString", + "MTLDataType", +] +MTLStageInputOutputDescriptor = [ + "objc2-foundation/NSObject", + "MTLArgument", +] +MTLComputePipeline = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "MTLAllocation", +] +MTLRenderPipeline = [ + "bitflags", + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "MTLAllocation", +] +MTLDevice = [ + "bitflags", + "objc2-foundation/NSArray", + "objc2-foundation/NSBundle", + "objc2-foundation/NSError", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSURL", + "MTLLibrary", + "MTLResource", + "MTLGPUAddress", +] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] dispatch2 = ["dep:dispatch2"] @@ -276,13 +316,8 @@ MTLAccelerationStructure = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -MTLAccelerationStructureCommandEncoder = ["objc2-foundation/NSObject"] MTLAccelerationStructureTypes = [] MTLAllocation = [] -MTLArgument = [ - "objc2-foundation/NSArray", - "objc2-foundation/NSString", -] MTLArgumentEncoder = [ "objc2-foundation/NSRange", "objc2-foundation/NSString", @@ -328,12 +363,6 @@ MTLCommandQueue = [ ] MTLComputeCommandEncoder = ["objc2-foundation/NSRange"] MTLComputePass = ["objc2-foundation/NSObject"] -MTLComputePipeline = [ - "objc2-foundation/NSArray", - "objc2-foundation/NSError", - "objc2-foundation/NSObject", - "objc2-foundation/NSString", -] MTLCounters = [ "objc2-foundation/NSArray", "objc2-foundation/NSData", @@ -348,15 +377,6 @@ MTLDepthStencil = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -MTLDevice = [ - "bitflags", - "objc2-foundation/NSArray", - "objc2-foundation/NSBundle", - "objc2-foundation/NSError", - "objc2-foundation/NSObject", - "objc2-foundation/NSString", - "objc2-foundation/NSURL", -] MTLDeviceCertification = [ "objc2-foundation/NSNotification", "objc2-foundation/NSProcessInfo", @@ -456,13 +476,6 @@ MTLRenderPass = [ "bitflags", "objc2-foundation/NSObject", ] -MTLRenderPipeline = [ - "bitflags", - "objc2-foundation/NSArray", - "objc2-foundation/NSError", - "objc2-foundation/NSObject", - "objc2-foundation/NSString", -] MTLResidencySet = [ "objc2-foundation/NSArray", "objc2-foundation/NSObject", @@ -483,7 +496,6 @@ MTLSampler = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -MTLStageInputOutputDescriptor = ["objc2-foundation/NSObject"] MTLTensor = [ "bitflags", "objc2-foundation/NSError", diff --git a/framework-crates/objc2-ui-kit/Cargo.modified.toml b/framework-crates/objc2-ui-kit/Cargo.modified.toml index 47fd3fe7d..19d9414d7 100644 --- a/framework-crates/objc2-ui-kit/Cargo.modified.toml +++ b/framework-crates/objc2-ui-kit/Cargo.modified.toml @@ -6,3 +6,19 @@ objc2-cloud-kit = { workspace = true, optional = true, features = [ "CKShare", "CKShareMetadata", ] } + +# TODO(breaking): Remove this workaround. +[features] +UISceneSession = [ + "objc2-foundation/NSDictionary", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSUserActivity", + "UISceneConfiguration", +] +UIWindowScene = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSString", + "UISceneSizeRestrictions", +] diff --git a/framework-crates/objc2-ui-kit/Cargo.toml b/framework-crates/objc2-ui-kit/Cargo.toml index 5e2439839..31030ade2 100644 --- a/framework-crates/objc2-ui-kit/Cargo.toml +++ b/framework-crates/objc2-ui-kit/Cargo.toml @@ -540,6 +540,19 @@ default = [ ] std = ["alloc"] alloc = [] +UISceneSession = [ + "objc2-foundation/NSDictionary", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSUserActivity", + "UISceneConfiguration", +] +UIWindowScene = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSString", + "UISceneSizeRestrictions", +] bitflags = ["dep:bitflags"] block2 = ["dep:block2"] objc2-cloud-kit = ["dep:objc2-cloud-kit"] @@ -1746,12 +1759,6 @@ UISceneOptions = [ "objc2-foundation/NSString", "objc2-foundation/NSUserActivity", ] -UISceneSession = [ - "objc2-foundation/NSDictionary", - "objc2-foundation/NSObject", - "objc2-foundation/NSString", - "objc2-foundation/NSUserActivity", -] UISceneSessionActivationRequest = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", @@ -2207,11 +2214,6 @@ UIWindow = [ "objc2-foundation/NSObject", "objc2-foundation/NSString", ] -UIWindowScene = [ - "objc2-foundation/NSArray", - "objc2-foundation/NSError", - "objc2-foundation/NSString", -] UIWindowSceneActivationAction = [ "objc2-foundation/NSCoder", "objc2-foundation/NSObject", diff --git a/generated b/generated index b7bbb3dc4..f86230e78 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit b7bbb3dc45b933f0453b13a827002a70c39533df +Subproject commit f86230e78d69f2a6c13ea55f7894207014138b66 From 0ba244500c2094ef4bbba6e90ac7056ce7ba9b19 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 9 Sep 2025 23:17:15 +0200 Subject: [PATCH 09/10] Update to Xcode 26 RC 1 --- framework-crates/objc2-av-foundation/Cargo.toml | 16 ++++++++++++++++ generated | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/framework-crates/objc2-av-foundation/Cargo.toml b/framework-crates/objc2-av-foundation/Cargo.toml index 2347cf7cf..c97ad6176 100644 --- a/framework-crates/objc2-av-foundation/Cargo.toml +++ b/framework-crates/objc2-av-foundation/Cargo.toml @@ -177,6 +177,7 @@ default = [ "AVCaptureDepthDataOutput", "AVCaptureDeskViewApplication", "AVCaptureDevice", + "AVCaptureExternalDisplayConfigurator", "AVCaptureFileOutput", "AVCaptureIndexPicker", "AVCaptureInput", @@ -193,6 +194,7 @@ default = [ "AVCaptureSystemExposureBiasSlider", "AVCaptureSystemPressure", "AVCaptureSystemZoomSlider", + "AVCaptureTimecodeGenerator", "AVCaptureVideoDataOutput", "AVCaptureVideoPreviewLayer", "AVComposition", @@ -203,6 +205,7 @@ default = [ "AVDepthData", "AVError", "AVExternalStorageDevice", + "AVExternalSyncDevice", "AVFAudio", "AVFCapture", "AVFCore", @@ -503,6 +506,7 @@ AVCaptureDevice = [ "objc2-foundation/NSString", "objc2-foundation/NSValue", ] +AVCaptureExternalDisplayConfigurator = [] AVCaptureFileOutput = [ "objc2-foundation/NSArray", "objc2-foundation/NSDictionary", @@ -566,6 +570,13 @@ AVCaptureSystemPressure = [ "objc2-foundation/NSString", ] AVCaptureSystemZoomSlider = [] +AVCaptureTimecodeGenerator = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSDate", + "objc2-foundation/NSObject", + "objc2-foundation/NSString", + "objc2-foundation/NSUUID", +] AVCaptureVideoDataOutput = [ "objc2-foundation/NSArray", "objc2-foundation/NSDictionary", @@ -624,6 +635,11 @@ AVExternalStorageDevice = [ "objc2-foundation/NSURL", "objc2-foundation/NSUUID", ] +AVExternalSyncDevice = [ + "objc2-foundation/NSArray", + "objc2-foundation/NSError", + "objc2-foundation/NSUUID", +] AVFAudio = [] AVFCapture = [] AVFCore = [] diff --git a/generated b/generated index f86230e78..096db67b5 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit f86230e78d69f2a6c13ea55f7894207014138b66 +Subproject commit 096db67b54bdc707ae60d538c187a0480c5c7408 From 1d78eb7474f56faef32c1b209dea97d423b57762 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Tue, 16 Sep 2025 03:52:09 +0200 Subject: [PATCH 10/10] Update to Xcode 26.0 --- generated | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generated b/generated index 096db67b5..909ba4522 160000 --- a/generated +++ b/generated @@ -1 +1 @@ -Subproject commit 096db67b54bdc707ae60d538c187a0480c5c7408 +Subproject commit 909ba452275026bdae4e61ef18db7fd94577dde0