Skip to content

Commit ba930d8

Browse files
authored
Fix SDK mismatch issue (#783)
1 parent 4e97041 commit ba930d8

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Sources/OpenSwiftUI_SPI/Shims/UIFoundation/NSStringDrawing.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ typedef NS_OPTIONS(NSInteger, NSStringDrawingOptions) {
5757
NSStringDrawingUsesFontLeading = 1 << 1, // Uses the font leading for calculating line heights
5858
NSStringDrawingUsesDeviceMetrics = 1 << 3, // Uses image glyph bounds instead of typographic bounds
5959
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.
60+
// Check if Xcode 26.0 related platform SDKs are available
61+
#if (defined(__IPHONE_26_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_26_0) || \
62+
(defined(__MAC_26_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_26_0) || \
63+
(defined(__TV_26_0) && __TV_OS_VERSION_MAX_ALLOWED >= __TV_26_0) || \
64+
(defined(__WATCH_26_0) && __WATCH_OS_VERSION_MAX_ALLOWED >= __WATCH_26_0)
65+
/// Specifies the behavior for resolving ``NSTextAlignment.natural`` to the visual alignment.
66+
///
67+
/// When set, the resolved visual alignment is determined by the resolved base writing direction; otherwise, it is using the user’s preferred language.
68+
NSStringDrawingOptionsResolvesNaturalAlignmentWithBaseWritingDirection API_AVAILABLE(macos(26.0), ios(26.0), tvos(26.0), visionos(26.0), watchos(26.0)) = (1 << 9),
69+
#endif
6070
#if OPENSWIFTUI_TARGET_OS_OSX
6171
NSStringDrawingDisableScreenFontSubstitution API_DEPRECATED("", macos(10.0,10.11)) = (1 << 2),
6272
NSStringDrawingOneShot API_DEPRECATED("", macos(10.0,10.11)) = (1 << 4),

0 commit comments

Comments
 (0)