View in English

  • Apple Developer
    • Get Started

    Explore Get Started

    • Overview
    • Learn
    • Apple Developer Program

    Stay Updated

    • Latest News
    • Hello Developer
    • Platforms

    Explore Platforms

    • Apple Platforms
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store

    Featured

    • Design
    • Distribution
    • Games
    • Accessories
    • Web
    • Home
    • CarPlay
    • Technologies

    Explore Technologies

    • Overview
    • Xcode
    • Swift
    • SwiftUI

    Featured

    • Accessibility
    • App Intents
    • Apple Intelligence
    • Games
    • Machine Learning & AI
    • Security
    • Xcode Cloud
    • Community

    Explore Community

    • Overview
    • Meet with Apple events
    • Community-driven events
    • Developer Forums
    • Open Source

    Featured

    • WWDC
    • Swift Student Challenge
    • Developer Stories
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Centers
    • Documentation

    Explore Documentation

    • Documentation Library
    • Technology Overviews
    • Sample Code
    • Human Interface Guidelines
    • Videos

    Release Notes

    • Featured Updates
    • iOS
    • iPadOS
    • macOS
    • watchOS
    • visionOS
    • tvOS
    • Xcode
    • Downloads

    Explore Downloads

    • All Downloads
    • Operating Systems
    • Applications
    • Design Resources

    Featured

    • Xcode
    • TestFlight
    • Fonts
    • SF Symbols
    • Icon Composer
    • Support

    Explore Support

    • Overview
    • Help Guides
    • Developer Forums
    • Feedback Assistant
    • Contact Us

    Featured

    • Account Help
    • App Review Guidelines
    • App Store Connect Help
    • Upcoming Requirements
    • Agreements and Guidelines
    • System Status
  • Quick Links

    • Events
    • News
    • Forums
    • Sample Code
    • Videos
 

Videos

Open Menu Close Menu
  • Collections
  • All Videos
  • About

More Videos

  • About
  • Summary
  • Code
  • 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.

    Chapters

    • 0:00 - Introduction
    • 3:25 - Handwriting recognition
    • 8:38 - Path conversion
    • 10:21 - Improved model access
    • 11:25 - Stroke slicing
    • 13:48 - Next steps

    Resources

    • Controlling stroke rendering for animation and editing
    • Recognizing handwriting and converting it to text
    • Building a handwriting recognition experience with PencilKit
    • PencilKit
      • HD Video
      • SD Video

    Related Videos

    WWDC26

    • Unwrap PaperKit

    WWDC25

    • Meet PaperKit

    WWDC20

    • Inspect, modify, and construct PencilKit drawings
  • Search this video…
    • 3:53 - Recognized text

      import PencilKit
      
      let recognizer = PKStrokeRecognizer()
      await recognizer.updateDrawing(drawing)
      myLabel.text = await recognizer.recognizedText()
    • 5:22 - Indexable content

      import PencilKit
      
      let recognizer = PKStrokeRecognizer()
      await recognizer.updateDrawing(drawing)
      if let indexedContent = await recognizer.indexableContent {
          index(text: indexedContent)
      }
    • 6:58 - 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)
      }
    • 0:00 - Introduction
    • Meet the PencilKit APIs behind handwriting in Notes and Freeform, now available to your apps in iOS 27.

    • 3:25 - Handwriting recognition
    • Use the stroke recognizer API for on-device text recognition, indexing, search, and accessibility.

    • 8:38 - Path conversion
    • Converting PKStrokePath to and from Bézier paths without losing fidelity, so apps that store strokes as Bézier can build PKDrawings and use handwriting recognition on any canvas, not just PKCanvasView.

    • 10:21 - Improved model access
    • Deeper access to the drawing model in iOS 27 — stable Identifiable stroke IDs that survive edits and undo, controllable canvas selection with a change delegate, and adjustable wet-ink render groups.

    • 11:25 - Stroke slicing
    • Two ways to slice strokes — programmatic erasing that cuts one stroke into independent strokes, and substroke extraction with parametric ranges — along with performance considerations for complex drawings.

    • 13:48 - Next steps
    • Ways to put these APIs to work: adopt PKStrokeRecognizer for handwriting recognition, convert existing Bézier paths, track strokes with stable identity, and use stroke slicing for erasing and animation.

Developer Footer

  • Videos
  • WWDC26
  • Read between the strokes with PencilKit
  • Open Menu Close Menu
    • iOS
    • iPadOS
    • macOS
    • tvOS
    • visionOS
    • watchOS
    • App Store
    Open Menu Close Menu
    • Swift
    • SwiftUI
    • Swift Playground
    • TestFlight
    • Xcode
    • Xcode Cloud
    • Icon Composer
    • SF Symbols
    Open Menu Close Menu
    • Accessibility
    • Accessories
    • Apple Intelligence
    • Audio & Video
    • Augmented Reality
    • Business
    • Design
    • Distribution
    • Education
    • Games
    • Health & Fitness
    • In-App Purchase
    • Localization
    • Maps & Location
    • Machine Learning & AI
    • Security
    • Safari & Web
    Open Menu Close Menu
    • Documentation
    • Downloads
    • Sample Code
    • Videos
    Open Menu Close Menu
    • Help Guides & Articles
    • Contact Us
    • Forums
    • Feedback & Bug Reporting
    • System Status
    Open Menu Close Menu
    • Apple Developer
    • App Store Connect
    • Certificates, IDs, & Profiles
    • Feedback Assistant
    Open Menu Close Menu
    • Apple Developer Program
    • Apple Developer Enterprise Program
    • App Store Small Business Program
    • MFi Program
    • Mini Apps Partner Program
    • News Partner Program
    • Video Partner Program
    • Security Bounty Program
    • Security Research Device Program
    Open Menu Close Menu
    • Meet with Apple
    • Apple Developer Centers
    • App Store Awards
    • Apple Design Awards
    • Apple Developer Academies
    • WWDC
    Read the latest news.
    Get the Apple Developer app.
    Copyright © 2026 Apple Inc. All rights reserved.
    Terms of Use Privacy Policy Agreements and Guidelines