2026 SwiftUI & UI FrameworksApp Services
WWDC26 · 15 min · SwiftUI & UI Frameworks / App Services
Read between the strokes with PencilKit
Unlock handwriting recognition in your apps using the same powerful technology behind Apple apps like Freeform and Notes. Discover how to use handwriting recognition across a wide range of alphabets and languages, and explore new capabilities for integrating PencilKit into a wider variety of apps.
Watch at developer.apple.com ↗Chapters
Code shown on screen · 3 snippets
Recognized text
import PencilKit
let recognizer = PKStrokeRecognizer()
await recognizer.updateDrawing(drawing)
myLabel.text = await recognizer.recognizedText() Indexable content
import PencilKit
let recognizer = PKStrokeRecognizer()
await recognizer.updateDrawing(drawing)
if let indexedContent = await recognizer.indexableContent {
index(text: indexedContent)
} Find text
import PencilKit
let recognizer = PKStrokeRecognizer()
await recognizer.updateDrawing(drawing)
let results = await recognizer.search("apple")
for result in results {
highlight(bounds: result.bounds)
} Resources
Related sessions
-
8 min -
12 min -
16 min