How do I support Resume?

Asked on 2024-07-30

1 search

To support the "Resume" functionality in your app, you can follow these steps:

  1. Implement Delegate Methods: Use the new delegate methods introduced for writing tools in UITextView or NSTextView. Specifically, you can use the writingToolsViewDidBegin and writingToolsViewDidEnd methods to manage your app's state during a writing tools session. For example, you might want to pause syncing or other operations that could interfere with text editing.

  2. Use the isWritingToolsActive Property: This property helps you determine if writing tools are currently active. You can use this to conditionally handle text operations in your app.

  3. Handle Long Text: When dealing with long text, the rewritten text may be delivered in chunks. Ensure your app can handle these chunks appropriately, possibly by applying animations to indicate processing.

For more detailed information, you can refer to the session Get started with Writing Tools at the timestamp 05:12.

Relevant Sessions

If you need more specific details or have other questions, feel free to ask!

How do I support Resume? | Ask WWDC