Hi Mike,
Currently I'm using FB to save data to my App. FB have a great feature of sync data automatic, so I need only to "setValue" and anything will be sync as soon as possible.
Now, sometime we need to save data and image/video at the same time. As you know, Storage and Database isn't the same instance, so we need to save data only after uploaded image/video to maintain its synchronized (i.e. my FEED must have the correct link for image/video )
Will be great if both (Database and Storage) works together in sync like a "unit transaction".
Like it:
let localFile = NSURL(...)
let link = storage.linkFile(localFile) // queue to upload
let feed = [ user: "Alex", photo : link ];
firebase.child(...).setValue(feed)
Now, FB detect a "link to storage" and queue data to be saved after upload. If App restart, upload continues without problem. The offline version of FB see the data without problem, like today, but will be only synchronized after file upload, so its make easy to delete data not synchronized.
Thanks,
Alexnaldo Santos