Add drawings, shapes, and a consistent markup experience using PaperKit. Use when integrating PaperMarkupViewController for markup editing, adding shape recognition, working with PaperMarkup data models, embedding markup tools in document editors, or building annotation features that need the system-standard markup toolbar. New in iOS 26.
PaperKit is Apple's unified markup framework, new in iOS/iPadOS 26, macOS 26, and visionOS 26, and the same technology behind markup in Notes, Screenshots, QuickLook, and Journal. The guide explains how to combine PencilKit freeform drawing with structured markup elements (shapes, text boxes, images, and lines) inside a single canvas managed by PaperMarkupViewController, targeting Swift 6.3 and the iOS 26+ SDK with no entitlements or special Info.plist entries required. It documents the three core components: PaperMarkupViewController (the interactive, scrollable canvas), PaperMarkup (a Sendable data model that serializes all markup and drawing), and the MarkupEditViewController / MarkupToolbarViewController insertion UI. A UIKit setup shows wiring the view controller with a page-bounds PaperMarkup, a FeatureSet, a PKToolPicker, and the delegate that saves on change. Key properties (markup, selectedMarkup, isEditable, isRulerActive, drawingTool, contentView, zoomRange, supportedFeatureSet), TouchMode cases for finger drawing versus selection, and content-background alignment for annotating PDF pages or images are covered. The data-model section walks through creating an empty markup with a coordinate-space bounds, loading from a dataRepresentation, saving via the async throws dataRepresentation(), and inserting text boxes, images, shapes, and arrow-tipped lines programmatically. Available shape types include rectangle, roundedRectangle, ellipse, line, arrowShape, star, chatBubble, and regularPolygon. Additional operations merge another PaperMarkup or a PKDrawing, apply affine transforms, strip unsupported elements, and expose indexableContent for search. Delegate callbacks report markup changes, drawing start, selection, and visible-frame changes. Because the framework is beta-sensitive, the guide flags that its API surface may change and should be verified against current Apple documentation before shipping. Appropriate when embedding a system-standard markup toolbar, building annotation features, or persisting structured drawings.
iOS 26.0+, iPadOS 26.0+, Mac Catalyst 26.0+, macOS 26.0+, and visionOS 26.0+, using Swift 6.3 and the iOS 26+ SDK.
No. It requires no entitlements or special Info.plist entries; you just import PaperKit.
PaperMarkup serializes to Data via the async throws dataRepresentation() method, and you reload it with PaperMarkup(dataRepresentation:).
rectangle, roundedRectangle, ellipse, line, arrowShape, star, chatBubble, and regularPolygon, via insertNewShape and insertNewLine using a ShapeConfiguration.
Set the background through contentView and keep the PaperMarkup(bounds:) coordinate space aligned to the background content size so saved annotations restore in the right place.
Quick Setup:
.claude/skills/Repository
dpearson2699/swift-ios-skills