Menu

SwiftUI Document API: ReadableDocument and WritableDocument
πŸ“°

SwiftUI Document API: ReadableDocument and WritableDocument

DEV Community: iosΒ·Muhittin Γ‡amdalΔ±Β·about 15 hours ago
#rISZ9DzG
#devtoios#devto#dev#document#type
Reading 0:00
15s threshold

SwiftUI's Document API got a fundamental update with iOS 27: Apple introduced two new protocols for document-based apps, ReadableDocument and WritableDocument . In this post I walk through the difference between these protocols and FileDocument / ReferenceFileDocument , the incremental/asynchronous write mechanism, and the multi-document creation flow with DocumentCreationSource , step by step, based on Apple's WWDC26 resources and an independent write-up that corroborates them.

πŸ’‘ Pro Tip: If you're starting a project whose new deployment target is 27+, start directly with ReadableDocument / WritableDocument instead of FileDocument β€” migrating back later is far more expensive than starting there.

Why the new protocols arrived

Apple's official WWDC26 guide describes the expanded SwiftUI Document API this way: "The expanded SwiftUI Document API gives you direct control over the structure of your saved documents.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.