iCloud for File Sharing for newbie

My app uses local files to store data created by the user and I am considering integrating iCloud to facilitate syncing across devices and file sharing. Currently I use Dropbox to do that. The users of my app are sometimes out of range of any internet connection when they create data files. Will iCloud accomplish syncing automatically the next time internet connection is available, or does my app have to do something at that time when it might not even be running? Also, does iCloud document storage provide the means for the user to access these files outside of my app, say for instance, from desktop Windows, and then sent to others by email independently of the Apple infrastructure? That is what I currently do with Dropbox. Can I use iCloud to do the same thing?