1

I've built an app, with iCloud enabled, and I'm running it on two devices.

What I'm expecting is that when I add some data, it gets written to the NSUserDefaults and using the MKiCloudSync class, subsequently gets uploaded to iCloud. This appears to be working.

When I then open the app on another device, I'm attempting to pull the NSUserDefaults down from iCloud (via MKiCloudSync).

I'm running two devices on the same code (and I've tried it with a distribution build). The devices are both iCloud enabled and connected to the same account.

However, after creating some data on the first device, then attempting to pull it down from the second device, I'm not getting any data back. Both devices attempt to pull down data when I start them up, but neither of them share their data.

What am I missing? Thanks guys.

theDuncs
  • 4,649
  • 4
  • 39
  • 63

1 Answers1

0

NSUserDefaults does not automatically sync to the cloud.

You can use:

https://github.com/MugunthKumar/MKiCloudSync

Although, using the key/value store is very flaky. A lot of developers (as well as myself) are reporting inconsistent syncs.

Roger Gilbrat
  • 3,755
  • 5
  • 34
  • 58
  • I'm using MKiCloudSync to perform the syncing already. The updateFromiCloud doesn't get called even though there are changed which appear to have been pushed. – theDuncs Oct 23 '12 at 21:58
  • 1
    Sorry, I didn't see that in your post. If you are running into sync issues, then it's probably because the key/value store is just broken. I was trying to add cloud saves to my game and gave up a few weeks ago do due these issues. I opened a ticket with Apple and they were no help. There is a long thread on the Apple dev forms about it being broken. – Roger Gilbrat Oct 23 '12 at 22:10
  • 2
    Not just key/value store, even the document store is broken. iCloud sync doesn't offer any way to troubleshoot via a web interface. – Mugunth Oct 24 '12 at 08:59