I am using MagicalRecord in my project. It has been working fine so far with a SQLite store.
But now I am trying to “upgrade” to iCloud to have sync between my iPhone and iPad versions.
But it is not working as I expected. The app still works the same – data is getting saved and read back, but it is not saved in iCloud as I would expect.
The only change I have made is in the MagicalRecord setup.
Before:
[MagicalRecordHelpers setupCoreDataStackWithAutoMigratingSqliteStoreNamed:@"hdhomerun.sqlite"];
After:
[MagicalRecordHelpers setupCoreDataStackWithiCloudContainer:@"AAAAAAAAAA.com.unpaq.hdhomerun" localStoreNamed:@"hdhomerun_local"];
The AAAAA’s are not AAAAA’s in the code, but my private ID from developer profile.
I can see in the output log that iCloud is detected and no errors occur. I also tried stepping through the code and it all looks fine.
What am I missing? Do I need to listen to some event?
I have not been able to find an example of how to use MagicalRecord with iCloud.
The version of MagicalRecord is this one:
https://github.com/magicalpanda/MagicalRecord
OK, I’ll answer my own question.
MagicalRecord, at the point when I was using it, did not work with iCloud.
But it has recently been fixed by this commit:
https://github.com/emrosenf/MagicalRecord/commit/8415276615d9a9e12db9c0207bae373b7397dd56
And now it is working fine.