This is your go-to reference when you need to add drawing or annotation features to an iOS app. It covers the essentials: setting up PKCanvasView, managing the tool picker, serializing drawings to disk, exporting to images, and wrapping everything in SwiftUI. The stroke inspection section is especially useful if you need to analyze what users drew rather than just save a static image. One thing to know: the drawing policy options matter more than you'd think. Default mode lets Apple Pencil draw while fingers scroll, but you'll probably want anyInput for most annotation use cases. The SwiftUI wrapper example is clean and handles the delegate pattern correctly, which saves you from the usual UIViewRepresentable headaches.
npx skills add https://github.com/dpearson2699/swift-ios-skills --skill pencilkit