Skip to content

AppKit macOS xcode27.0 b4

Alex Soto edited this page Jul 23, 2026 · 2 revisions

#AppKit.framework

diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingSession.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingSession.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingSession.h	2026-07-02 01:11:46
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSDraggingSession.h	2026-07-16 03:50:30
@@ -50,11 +50,5 @@
 - (void)enumerateDraggingItemsWithOptions:(NSDraggingItemEnumerationOptions)enumOpts forView:(nullable NSView *)view classes:(NSArray<Class> *)classArray searchOptions:(NSDictionary<NSPasteboardReadingOptionKey, id> *)searchOptions usingBlock:(void (NS_NOESCAPE ^)(NSDraggingItem *draggingItem, NSInteger idx, BOOL *stop))block;
 @end
 
-@interface NSDraggingSession (Deprecated)
-
-- (void)updateDragWithGesture:(NSGestureRecognizer *)gesture NS_SWIFT_NAME(updateDrag(from:)) API_DEPRECATED("This method is deprecated and has no effect.", macos(27.0, 27.1));
-
-@end
-
 API_UNAVAILABLE_END
 NS_HEADER_AUDIT_END(nullability, sendability)
diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h	2026-07-02 01:11:46
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSMenuItem.h	2026-07-16 03:50:30
@@ -91,6 +91,8 @@
 /* Suppose the system detects a given key equivalent with the following input string [ ] { } ( ) < > ← → in a right-to-left user interface environment (NSUserInterfaceLayoutDirectionRightToLeft); in that case, the system will automatically mirror the key equivalent. For example, a pair of menu items with key equivalents { and } will be localized to } and { in a right-to-left user interface. By setting this property to NO, you will opt-out this menu item of automatically mirroring in RTL. It would be best only to do this if your shortcut action will result in some sort of directional change in the UI, e.g. text alignment or a D-pad in a game. YES by default for apps linked against 12.0 and later SDK. */
 @property BOOL allowsAutomaticKeyEquivalentMirroring API_AVAILABLE(macos(12.0));
 
+/// Set an image that is displayed next to the menu item's title.
+/// Note that in macOS 27 and later, AppKit determines the visibility of menu item images, and will typically hide images. Use the `preferredImageVisibility` property with the `.visible` constant to specify that an image should always be visible.
 @property (nullable, strong) NSImage *image;
 
 /// A menu item's image visibility determines whether the item's image is displayed when the menu is open.
diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h	2026-07-02 01:11:44
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTextField.h	2026-07-16 03:50:28
@@ -40,6 +40,11 @@
 
 @property NSTextFieldBezelStyle bezelStyle;
 
+/// Set border shape
+/// `NSControlBorderShapeAutomatic` sets text field or subclass to default system shape.
+/// `NSControlBorderShapeCircle` sets text field or subclass to `NSControlBorderShapeAutomatic`.
+@property NSControlBorderShape borderShape API_AVAILABLE(macos(26.0));
+
 /* The preferredMaxLayoutWidth determines the maximum width of the intrinsicContentSize. If the text field wraps, the intrinsic height will be large enough to show the entire text contents at that width. The default is 0, which implies no maximum preferred width.
  */
 @property CGFloat preferredMaxLayoutWidth API_AVAILABLE(macos(10.8));
diff -ruN /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h
--- /Applications/Xcode_27.0.0-beta3.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h	2026-07-02 01:11:44
+++ /Applications/Xcode_27.0.0-beta4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSWritingToolsCoordinator.h	2026-07-16 03:50:28
@@ -8,6 +8,7 @@
 #import <Foundation/NSArray.h>
 #import <Foundation/NSGeometry.h>
 #import <CoreGraphics/CGImage.h>
+#import <AppKit/NSText.h>
 #import <AppKit/NSTextCheckingClient.h>
 
 APPKIT_API_UNAVAILABLE_BEGIN_MACCATALYST
@@ -140,6 +141,32 @@
     /// ``NSWritingToolsCoordinator/Delegate/writingToolsCoordinator(_:replace:in:proposedText:reason:animationParameters:completion:)``
     /// method, update your view’s text storage without animating the change.
     NSWritingToolsCoordinatorTextReplacementReasonNoninteractive, // an unanimated replacement prompted from writing tools, perhaps copied from the overlay-panel experience, perhaps a reverted rewrite or individual proofreading suggestion, and so forth
+
+    /// An option to replace the text in your view when a grammar suggestion
+    /// is accepted.
+    ///
+    /// When the user interacts with a grammar issue and the UI is shown,
+    /// and the option to accept a suggestion is chosen, this reason will be
+    /// used. Update your view's text storage without animating the change.
+    NSWritingToolsCoordinatorTextReplacementReasonAccepted API_AVAILABLE(macos(27.0)) = 2, // a replacement from grammar presentation, representing acceptance of a proposed suggestion
+
+    /// An option to replace the text in your view when a grammar suggestion
+    /// is rejected.
+    ///
+    /// When the user interacts with a grammar issue and the UI is shown,
+    /// and the option to ignore a suggestion is chosen, this reason will be
+    /// used. Update your view's text storage without animating the change.
+    /// In addition, use ``ignoreGrammarRange`` on ``NSSpellChecker``
+    /// to make sure that the suggestion will continue to be ignored.
+    NSWritingToolsCoordinatorTextReplacementReasonRejected API_AVAILABLE(macos(27.0)) = 3, // a replacement from grammar presentation, representing rejection of a proposed suggestion, which should subsequently be ignored
+
+    /// An option to replace the text in your view when a grammar suggestion
+    /// is temporarily shown to preview the proposed change in the text.
+    ///
+    /// When the user interacts with a grammar issue and the UI is shown,
+    /// in some cases the suggestion needs to be shown temporarily.
+    /// Update your view's text storage without animating the change.
+    NSWritingToolsCoordinatorTextReplacementReasonTemporary API_AVAILABLE(macos(27.0)) = 4, // a replacement from grammar presentation, representing a temporary preview of a proposed suggestion
 } API_AVAILABLE(macos(15.2)) NS_SWIFT_NAME(NSWritingToolsCoordinator.TextReplacementReason);
 
 /// Options that indicate how much of your content Writing Tools requested.
@@ -226,8 +253,33 @@
     /// text between the insertion point and the end of your text storage. When
     /// finishing the animation, show the text again.
     NSWritingToolsCoordinatorTextAnimationTranslate = 9, // The animation effect for translating the trailing or "remainder" text during a replace animation
+
+    /// The animation effect that Writing Tools performs on grammar issues
+    /// when they are first indicated.
+    ///
+    /// When preparing for this animation, hide the portion of the text for
+    /// which the grammar issue is going to be indicated. When finishing
+    /// the animation, show the text again.
+    NSWritingToolsCoordinatorTextAnimationIndicateGrammar API_AVAILABLE(macos(27.0)) = 10, // The animation effect performed on grammar issues when they are first indicated
 } API_AVAILABLE(macos(15.2)) NS_SWIFT_NAME(NSWritingToolsCoordinator.TextAnimation);
 
+/// Use the `NSWritingToolsCoordinator.TextDecoration` constants to determine
+/// the type of decoration to be applied to a preview for grammar animation.
+/// The grammar animation needs previews of the text of the issue in two forms,
+/// without and with the grammar indication underline applied. If you use
+/// grammar animation, you must implement the delegate method
+/// ``NSWritingToolsCoordinator/Delegate/writingToolsCoordinator(_:requestsPreviewFor:of:in:textDecoration:completion:)``
+/// to provide both forms of previews, based on the specified decoration.
+typedef NS_ENUM(NSInteger, NSWritingToolsCoordinatorTextDecoration) {
+    /// Requests a preview of the text without any additional decoration.
+    ///
+    NSWritingToolsCoordinatorTextDecorationNone,
+
+    /// Requests a preview of the text with the grammar indication underline.
+    ///
+    NSWritingToolsCoordinatorTextDecorationGrammarUnderline,
+} API_AVAILABLE(macos(27.0)) NS_SWIFT_NAME(NSWritingToolsCoordinator.TextDecoration);
+
 /// An object that manages interactions between Writing Tools and
 /// your custom text view.
 ///
@@ -453,6 +505,37 @@
 /// ``updateRange(_:with:reason:forContextWithIdentifier:)`` method to report
 /// that change instead.
 - (void)updateForReflowedTextInContextWithIdentifier:(NSUUID *)contextID NS_SWIFT_NAME(updateForReflowedTextInContextWithIdentifier(_:));
+
+// Grammar presentation support
+
+/// Used to support the presentation of grammar issues in text. When an issue
+/// is first identified and indicated, call this to have it animated.
+///
+/// The context should be large enough to contain the range being indicated,
+/// and the range should be the range of the issue within the context. Returns a
+/// UUID that can be used to cancel the animation, or nil if the animation cannot
+/// be performed. Calls delegate methods to prepare for the animation (which
+/// should hide the text), request previews (with and without underlines), and
+/// finish the animation (which should show the text).
+#if !TARGET_OS_IPHONE
+- (nullable NSUUID *)startTextAnimation:(NSWritingToolsCoordinatorTextAnimation)textAnimation forRange:(NSRange)range inContext:(NSWritingToolsCoordinatorContext *)context writingDirection:(NSWritingDirection)writingDirection API_AVAILABLE(macos(27.0)) NS_SWIFT_NAME(startTextAnimation(_:for:in:writingDirection:));
+#endif
+
+/// Used to support the presentation of grammar issues in text. If it is
+/// necessary to cancel the animation of one or more issues, call this
+/// to cancel theanimations.
+///
+/// The UUIDs passed in should be those returned when starting the
+/// animations. To cancel all ahimations, use ``stopWritingTools`` instead.
+- (void)cancelTextAnimationsWithIdentifiers:(NSArray <NSUUID *> *)identifiers API_AVAILABLE(macos(27.0)) NS_SWIFT_NAME(cancelTextAnimations(identifiers:));
+
+/// Used to support the presentation of grammar issues in text. When
+/// the user interacts with an issue, call this to bring up the relevant UI.
+///
+/// Pass in context and range to identify the issue the user selected.
+/// Returns NO if the UI cannot be brought up.
+- (BOOL)showGrammarPresentationForRange:(NSRange)range inContext:(NSWritingToolsCoordinatorContext *)context API_AVAILABLE(macos(27.0));
+
 @end
 
 #pragma mark NSWritingToolsCoordinatorDelegate
@@ -964,6 +1047,36 @@
 /// state when it’s making changes to your view’s text storage.
 - (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator willChangeToState:(NSWritingToolsCoordinatorState)newState completion:(void(^)(void))completion;
 
+// Grammar presentation support
+
+/// Asks the delegate for preview images for the specified text.
+///
+/// To support grammar animation, the delegate should provide previews for the
+/// relevant text, as with the required ``requestsPreviewFor`` method, but
+/// in this case showing the text with the specified decoration applied. The
+/// grammar animation needs previews of the text of the issue in two forms,
+/// without and with the grammar indication underline applied. If you use
+/// grammar animation, you must implement this delegate method to provide
+/// them, based on the specified decoration.
+- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator requestsPreviewForTextAnimation:(NSWritingToolsCoordinatorTextAnimation)textAnimation ofRange:(NSRange)range inContext:(NSWritingToolsCoordinatorContext *)context textDecoration:(NSWritingToolsCoordinatorTextDecoration)textDecoration completion:(void(^)(NSArray<NSTextPreview *> * _Nullable textPreviews))completion API_AVAILABLE(macos(27.0)) NS_SWIFT_ASYNC_NAME(writingToolsCoordinator(_:previewFor:range:context:textDecoration:));
+
+/// Asks the delegate for information about grammar issues in the specified context.
+///
+/// To support the grammar presentation UI, the delegate should provide information
+/// about the identified and currently indicated grammar issues in the specified context.
+/// The elements of the results array should be ``NSTextCheckingResult``
+/// objects of grammar type, of the sort that are returned from grammar checking,
+/// with ranges relative to the context. If you use grammar presentation, you must
+/// implement this delegate method to provide them.
+- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator requestsGrammarResultsForContext:(NSWritingToolsCoordinatorContext *)context completion:(void(^)(NSArray<NSTextCheckingResult *> *results))completion API_AVAILABLE(macos(27.0)) NS_SWIFT_ASYNC_NAME(writingToolsCoordinator(_:grammarResultsFor:));
+
+/// Notifies the delegate when the user chooses to disable grammar checking.
+///
+/// To support the grammar presentation UI, the delegate is notified if the user
+/// chooses the option provided in the grammar presentation UI to disable grammar
+/// checking for the view. If you use grammar presentation, you should implement
+/// this method to respond to that action.
+- (void)writingToolsCoordinator:(NSWritingToolsCoordinator *)writingToolsCoordinator setGrammarCheckingEnabled:(BOOL)enabled API_AVAILABLE(macos(27.0));
 
 #pragma mark Deprecated NSWritingToolsCoordinatorDelegate methods
 

Clone this wiki locally