how to work with text kit 2

Asked on 2025-10-22

1 search

To work with TextKit 2, you should be aware of several key aspects and best practices:

  1. Text Engine: TextKit 2 is the default text engine for UITextView and UITextField in iOS 26. It supports features like natural selection and bidirectional text management. However, if your app accesses TextView LayoutManager, it will revert to TextKit 1, disabling these features. To maintain TextKit 2 features, use TextView TextLayoutManager instead.

  2. Multilingual Support: TextKit 2 simplifies the experience of handling complex scripts and supports multiple languages, making it easier to build multilingual-ready apps. It manages bidirectional text seamlessly, which is crucial for languages like Arabic and Hebrew.

  3. Writing Tools Integration: TextKit 2 can be integrated with writing tools to enhance text editing experiences. This includes features like proofreading, rewriting, and summarizing text directly within text views. Writing tools are available across iOS, iPadOS, and macOS, and they work with native text views.

For more detailed information on working with TextKit 2, you can refer to the session Enhance your app’s multilingual experience (16:30) and Dive deeper into Writing Tools (09:08) from WWDC 2025. These sessions provide insights into the latest features and how to implement them in your apps.