Apple Text Attachments & Genmoji

0•

Optimizes the implementation of inline images, interactive views, and Genmoji across Apple's TextKit and attributed string frameworks.

This skill provides specialized guidance for managing complex inline content within Apple’s text-editing stack, including TextKit 2 view providers and iOS 18+ adaptive image glyphs. It addresses critical layout challenges such as baseline alignment math, view provider registration, and the common pitfalls of TextKit 1 fallback. By analyzing storage patterns and view-provider lifecycles, it helps developers ensure high-fidelity image rendering, interactive text components, and proper copy-paste serialization for modern iOS and macOS applications.

Key Features

01Ensures data persistence for image attachments during copy and paste operations
02Guides TextKit 2 NSTextAttachmentViewProvider implementation and lifecycle management
030 GitHub stars
04Corrects coordinate system confusion between Core Text baselines and UIKit origins
05Configures iOS 18+ Genmoji support via NSAdaptiveImageGlyph and UITextView opt-ins
06Diagnoses and prevents silent TextKit 1 fallback triggers that disable modern features

Use Cases

01Embedding interactive UI elements like switches or checkboxes directly within a scrollable text view
02Fixing vertical alignment and scaling issues for inline icons or product photos in rich text
03Implementing Genmoji and sticker support for messaging apps targeting iOS 18 and above