Is a file set to ubiquitous automatically uploaded when the user logs in to iCloud?

When a file in a local folder is set as ubiquitous and then the user logs in to iCloud for the first time, will the file be automatically duplicated to iCloud at that time, or would the file have to be manually set to ubiquitous again to cause the file to be duplicated to iCloud?

Accepted Reply

If the user is not logged in to the iCloud, you should not use setUbiquitous at all. Have you tried to see if this even works?

I usually check with NSFileManager.defaultManager.ubiquityIdentityToken, if iCloud is available and the user is logged in. If the property is nil, my app doesn't show any iCloud related UI elements.

Replies

If the user is not logged in to the iCloud, you should not use setUbiquitous at all. Have you tried to see if this even works?

I usually check with NSFileManager.defaultManager.ubiquityIdentityToken, if iCloud is available and the user is logged in. If the property is nil, my app doesn't show any iCloud related UI elements.

No I haven't tried. I recall now that you're right. Thank you.