ADR 0001: iCloud Drive Support vs CloudKit (Server-side)

Status

Accepted — 2025-12-14

Context

This repository provides a provider-agnostic IStorage abstraction for server-side and cross-platform .NET apps.

We want an “Apple cloud storage” option that behaves like other providers (upload/download/list/delete/metadata) and can run:

The user request is “iCloud” as a storage backend, ideally for file-like storage similar to OneDrive/Google Drive/Dropbox.

Problem

Apple’s “iCloud Drive” is primarily exposed to Apple platform apps via OS-level document APIs and does not have a stable, public, server-side file API comparable to:

There are unofficial approaches (reverse-engineered iCloud.com traffic) but they:

Decision

We will not implement an iCloud Drive provider in this repository unless Apple publishes and supports a proper server-side file API.

Instead, we support CloudKit Web Services via ManagedCode.Storage.CloudKit, which is an official Apple service intended for app data stored in iCloud.

CloudKit is not “iCloud Drive”, but it is the closest official server-side storage surface Apple exposes for app data.

flowchart TD
  Want["Need server-side iCloud file storage"] --> CheckAPI{Official iCloud Drive file API?}
  CheckAPI -->|No| CloudKit["Use CloudKit Web Services (ManagedCode.Storage.CloudKit)"]
  CheckAPI -->|Yes| Future["Add iCloud Drive provider (future)"]
  CloudKit --> Note["Document limitations: app data != iCloud Drive"]

Consequences

Positive

Negative

Alternatives Considered

  1. Unofficial iCloud Drive API wrappers
    • Rejected due to brittleness, auth complexity (2FA), and reliability/security risks.
  2. Apple platform-only implementation
    • Would not satisfy server-side scenarios and would complicate the provider model.

References (Internal)