Huy guys,
So I’m a bit lost with iCloud syncing.
Here’s the scenario:
User logs in on device A with internet access. Plays game for a while
iCloud:set("level",3);
User logs onto device B with no internet access. Plays game for a bit
iCloud:get("level"); // returns nil; iCloud:set("level",1); // Later, when the device connects to the internet iCloud:set("level",2);
User now goes back to device A
iCloud:get("level"); //returns 2
I’m trying to work out how to determine if you can detect if the user has retrieved iCloud data from the server.
I used iCloud.table(), and if it returns zero keys, don’t write to iCloud. However that’s flawed as a new user that has internet connection would also return zero keys.
Very confused. Help would be appreciated!
Thanks,