From 2e981d43708d954a0d18f3adab68c5770bcb699a Mon Sep 17 00:00:00 2001 From: Kyle Date: Sun, 8 Feb 2026 21:09:56 +0800 Subject: [PATCH] Fix SDK mismatch issue --- .../Shims/UIFoundation/NSStringDrawing.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Sources/OpenSwiftUI_SPI/Shims/UIFoundation/NSStringDrawing.h b/Sources/OpenSwiftUI_SPI/Shims/UIFoundation/NSStringDrawing.h index 543d2aec8..021c61cee 100644 --- a/Sources/OpenSwiftUI_SPI/Shims/UIFoundation/NSStringDrawing.h +++ b/Sources/OpenSwiftUI_SPI/Shims/UIFoundation/NSStringDrawing.h @@ -57,6 +57,16 @@ typedef NS_OPTIONS(NSInteger, NSStringDrawingOptions) { NSStringDrawingUsesFontLeading = 1 << 1, // Uses the font leading for calculating line heights NSStringDrawingUsesDeviceMetrics = 1 << 3, // Uses image glyph bounds instead of typographic bounds NSStringDrawingTruncatesLastVisibleLine API_AVAILABLE(macos(10.5), ios(6.0), tvos(9.0), watchos(2.0), visionos(1.0)) = 1 << 5, // Truncates and adds the ellipsis character to the last visible line if the text doesn't fit into the bounds specified. Ignored if NSStringDrawingUsesLineFragmentOrigin is not also set. + // Check if Xcode 26.0 related platform SDKs are available + #if (defined(__IPHONE_26_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_26_0) || \ + (defined(__MAC_26_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_26_0) || \ + (defined(__TV_26_0) && __TV_OS_VERSION_MAX_ALLOWED >= __TV_26_0) || \ + (defined(__WATCH_26_0) && __WATCH_OS_VERSION_MAX_ALLOWED >= __WATCH_26_0) + /// Specifies the behavior for resolving ``NSTextAlignment.natural`` to the visual alignment. + /// + /// When set, the resolved visual alignment is determined by the resolved base writing direction; otherwise, it is using the user’s preferred language. + NSStringDrawingOptionsResolvesNaturalAlignmentWithBaseWritingDirection API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0), watchos(26.0)) = (1 << 9), + #endif #if OPENSWIFTUI_TARGET_OS_OSX NSStringDrawingDisableScreenFontSubstitution API_DEPRECATED("", macos(10.0,10.11)) = (1 << 2), NSStringDrawingOneShot API_DEPRECATED("", macos(10.0,10.11)) = (1 << 4),