icloud-drive-ref

Reference iCloud Drive file synchronization with NSFileCoordinator and ubiquitous containers.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This reference covers file-based iCloud Drive synchronization using ubiquitous containers, NSFileCoordinator, and safe file coordination.

Core Features & Use Cases

  • Ubiquitous container usage, coordinated file access, and conflict handling
  • Reading/writing iCloud Drive files with proper safety
  • Guidance on moving and coordinating files across processes

Quick Start

Prompt: "Coordinate a safe read of an iCloud file from multiple processes."

Frequently Asked Questions about icloud-drive-ref

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

FAQPage Schema
How do I safely coordinate file reads and writes to iCloud Drive across multiple processes?

File coordination across processes requires NSFileCoordinator to serialize access to ubiquitous container files. Use coordinated read and write blocks to prevent conflicts and data corruption when multiple processes access the same iCloud-synced document simultaneously.

What's the first step to set up iCloud Drive file synchronization in my app?

Obtain the ubiquitous container URL using FileManager, which grants access to the app's iCloud Drive namespace. This URL serves as the root directory for all document-based sync operations and must be established before any file coordination.

Can I use NSFileCoordinator for moving files between iCloud and local storage?

Yes, NSFileCoordinator supports coordinated moves and preserves the Documents directory structure during transfers. Coordinate move operations to ensure consistent state across devices and prevent orphaned file references during iCloud sync.

How do I check if a file is fully downloaded from iCloud before reading it?

Query the file's download state and iCloud status before coordinated reads to avoid incomplete data. Check for download completion to ensure the file is available locally and ready for processing.

What error handling is required for iCloud file operations?

Implement error handling for coordination failures, network unavailability, and iCloud status changes during reads, writes, and moves. Proper error recovery ensures data integrity when iCloud sync encounters conflicts or temporary disconnections.

Does file-based iCloud sync work with structured data or only documents?

iCloud Drive file synchronization is designed for document-based workflows, not structured or relational data. Use it for file coordination across devices; for databases or complex schemas, consider alternative data persistence approaches.