I am going to take apart, layer by layer, roughly 90 lines of Swift that let my app write a single line into a file owned by a different app, inside that app's own iCloud Drive container, with no plugin and no server in between. Four layers, one API most iOS developers never touch on purpose, and one bug that cost me a weekend because I trusted FileHandle more than I trusted Apple's warning label on it.
What's in this teardown:
Why an iOS app cannot just guess another app's iCloud Drive path, and what UIDocumentPickerViewController actually grants you
Why the permission it grants goes stale, and the bookmark trick that survives a relaunch
Why a plain append can silently corrupt a file mid-sync, and what NSFileCoordinator changes about that






