what can developers do with writing tools
Asked on 07/31/2024
1 search
Developers can leverage the new suite of features called Writing Tools to enhance text fields across various apps. Here are some key functionalities and integration points:
-
Proofreading and Rewriting: Writing Tools help users proofread, rewrite, or transform text within text views. Suggestions appear in-line, making it easy to review and integrate changes quickly and seamlessly in any native text field (Get started with Writing Tools).
-
Rich Text Support: Writing Tools fully support rich text by using attributed strings, preserving attributes like styles, links, and attachments as long as the relevant text remains in the rewritten text (Get started with Writing Tools).
-
List and Table Transformations: If the text view supports lists and tables, Writing Tools can transform text into lists or tables while preserving formatting (Get started with Writing Tools).
-
Integration with Standard UI Frameworks: If you are using standard UI frameworks like
UITextView
,NSTextView
, orWKWebView
, Writing Tools will work automatically. For full functionality, ensure you are using the latest text storage capabilities (Get started with Writing Tools). -
Custom Text Views: For custom text views, developers can get a basic experience for free by adopting
UITextInteraction
orUITextSelectionDisplayInteraction
. This allows Writing Tools to appear in the color bar or context menu (Get started with Writing Tools). -
Delegate Methods and Properties: New delegate methods and properties are available to control app states during a Writing Tools session. For example, you can pause syncing or avoid accidental editing while Writing Tools is active (Get started with Writing Tools).
-
Ignoring Specific Text Ranges: Developers can specify ranges of text to be ignored by Writing Tools, such as code blocks or quoted content, using new delegate methods in
UITextFieldDelegate
andNSTextViewDelegate
(Get started with Writing Tools).
For more detailed information, you can refer to the session Get started with Writing Tools.

Platforms State of the Union
Discover the newest advancements on Apple platforms.

What’s new in AppKit
Discover the latest advances in Mac app development. Get an overview of the new features in macOS Sequoia, and how to adopt them in your app. Explore new ways to integrate your existing code with SwiftUI. Learn about the improvements made to numerous AppKit controls, like toolbars, menus, text input, and more.

Get started with Writing Tools
Learn how Writing Tools help users proofread, rewrite, and transform text in your app. Get the details on how Writing Tools interact with your app so users can refine what they have written in any text view. Understand how text is retrieved and processed, and how to support Writing Tools in custom text views.