storage-management-ref

Guide iOS storage management with URL resource value APIs for capacity checks and purge behavior.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides references for iOS storage management, disk space APIs, purgeability, and URL resource values to help you implement robust storage strategies.

Core Features & Use Cases

  • Disk space checks: Use capacity APIs to decide where to save data.
  • Purge strategies: Understand iOS purge behavior for caches and documents.
  • Backup considerations: Mark files as excluded from backups when appropriate.

Quick Start

Outline a storage strategy that checks capacity before saving user data and uses appropriate locations for purgeable data.

Frequently Asked Questions about storage-management-ref

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

FAQPage Schema
How do I check available disk space before saving data on iOS?

Use URLResourceValues to query volumeAvailableCapacityForImportantUsage or volumeAvailableCapacityForOpportunisticUsage on the target storage location. These APIs return the available capacity for your use case, allowing you to decide whether to proceed with the write operation safely.

What's the difference between purgeable and backup-excluded files?

Purgeable files (isPurgeable) can be automatically deleted by iOS when storage is low; backup-excluded files (isExcludedFromBackup) are never synced to iCloud. Use purgeable for caches and temporary data; use backup exclusion for large files or regenerable content you don't want in backups.

How do I implement a cache management strategy that respects iOS purge behavior?

Mark cache files as purgeable using URLResourceValues, store them in standard cache directories (Caches or Temporary), and check volumeAvailableCapacityForOpportunisticUsage before writes. iOS will purge these files first when space is needed, protecting user data.

When should I exclude files from backup?

Exclude large downloadable content, regenerable data, or temporary files that users can recreate. Set isExcludedFromBackup to reduce iCloud backup size and avoid unnecessary sync overhead for data that doesn't need cloud persistence.

Does iOS storage management work the same way on iPad and Mac?

Storage APIs and purge behavior are consistent across iOS, iPadOS, and macOS. However, Mac provides more storage and different user expectations; prioritize backup exclusion for large files and test capacity checks on each platform's typical disk constraints.