4 ms·
And if you keep files in iCloud Drive, your iPhone can remove the local copy any time. So if you want your files to be synced and to be 100% sure you'll have a
by antonkar 3y ago
And if you keep files in iCloud Drive, your iPhone can remove the local copy any time.
So if you want your files to be synced and to be 100% sure you'll have a local copy - you should keep the same file in iCloud Drive and in the "On My iPhone" folder. This is the reason Apple Books, Numbers and all the apps that use iCloud Drive remove local copies all the time.
I made a simple note-taking app using iCloud Drive - iCloud was greedily removing a 2 kb txt-file when the app was closed (sometimes it wasn't removing - it's quite random). It doesn't matter if you have a lot of storage space - iCloud still can remove the local version of a file you constantly use.
The Apple developer support said nothing can be done. Even for a developer there is no way to mark a file as never to be removed.
P.S. In their official docs Apple actually recommends to keep all the user's files in iCloud Drive and _not_ to keep a copy "On My iPhone"