Yes, this is insane, adding more complexitiy to an already complicated problem.
My use requires me to ideally use iCloud+Coredata and it famously fails badly. in iOS7 I wouldn't completely depend on it. So Im looking at what else can I do to get some cloud support. Since I'm an iPhone user, iCloud is very ideal for me only because of its deamon integrated OS Level. I wouldn't have to worry about my offline changes, atleast in theory.
Heres what I'm thinking of doing.
The app i want to use this in is Not a todolist, or something that requires hard syncing.
The DB has very simple tables, data-table
and folders-table
and data-folders-linker
.
Like the good old sqlite table.
I want to sync it to iCLoud in UIDocuments where i'd store the folders metadata within the single uidocument.
For each entry in data-table
, a new uidocument
would be created in iCloud.
A new device upon getting the "new" uidocument
would parse its data into the sqlite-store.
thats about it. Obviously, Its not perfect, nor is it remotely advisable. BUT I NEED CLOUD!
Already I see problems.
- How would a know a new UIDocument has arrived.
- How would I know that "this" UIDocument was deleted.
- Since I should not persist all UIDocuments into a tableView, i'll have that parsed into SQLite store. But I'd have to monitor alot of complex notifications and figure out what happened to the document and make changes to the sqlite-store.
One of the big reasons I was thinking about this is only because of my simple db structure. Please tell me how this is super flawed, and I shouldn't even attempt it, I'm doing this for me, and really needed some cloud support.