storage

Guide iOS storage decisions across SwiftData, Core Data, SQLite, and files.

1.1k|81|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/CharlesWiltgen/Axiom --skill storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: storage
Source: https://github.com/CharlesWiltgen/Axiom/tree/main/.claude-plugin/plugins/axiom/skills/storage
Command: npx skills add https://github.com/CharlesWiltgen/Axiom --skill storage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

A centralized decision hub for data storage options, including SwiftData, Core Data, GRDB, SQLite, file storage, and CloudKit sync.

Core Features & Use Cases

  • Level-1 decisions: Structured data vs files; local vs cloud.
  • Guidance on choosing between SwiftData, Core Data, SQLite/GRDB, and file storage.
  • Planning offline/online data architecture and migrations.

Quick Start

Decide between using SwiftData for modern structured persistence or SQLiteData for advanced SQL patterns and CloudKit sync.

Frequently Asked Questions about storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I choose between SwiftData, Core Data, and SQLite for iOS app storage?

SwiftData offers modern, type-safe structured persistence for iOS 17+; Core Data provides mature cross-platform support with complex relationships; SQLite suits advanced SQL patterns and fine-grained control. Match your choice to schema complexity, platform requirements, and sync needs.

Should I store data locally or use CloudKit for iOS apps?

Local storage suits offline-first apps and performance-critical data; CloudKit enables multi-device sync and server-side backup. Plan your architecture around connectivity requirements, data freshness expectations, and whether users need real-time synchronization.

What's the difference between Documents, Caches, and Application Support directories?

Documents stores user-created files and persistent app data; Caches holds temporary, regenerable content excluded from backups; Application Support stores app-generated support files. Choose based on backup requirements, user visibility, and data lifecycle.

How do I plan offline-first data architecture for iOS?

Design local storage as the primary source of truth, then layer sync logic to propagate changes to CloudKit or a server when connectivity returns. Implement conflict resolution and migration strategies before deployment.

Can I migrate data between SwiftData and Core Data?

Migration between frameworks requires exporting from source, transforming schema, and importing to destination. Plan this during app architecture phases; post-launch migrations demand careful user communication and data validation.

What file protection levels should I use for sensitive iOS app data?

Apply file protection rules based on sensitivity: complete for credentials and payments, completeUnlessOpen for general data, none for temporary content. Balance security with background task accessibility and offline requirements.