Master data with MagicalRecord not saved in iCloud

I am using MagicalRecord in my project. So far, he has worked with the SQLite store. But now I'm trying to β€œupgrade” to iCloud to sync between versions of the iPhone and iPad.

But it does not work as I expected. The app still works the same: the data is saved and read, but it is not saved in iCloud, as I expected.

The only change I made in setting up MagicalRecord.

Before:

[MagicalRecordHelpers setupCoreDataStackWithAutoMigratingSqliteStoreNamed:@"hdhomerun.sqlite"]; 

After:

 [MagicalRecordHelpers setupCoreDataStackWithiCloudContainer:@"AAAAAAAAAA.com.unpaq.hdhomerun" localStoreNamed:@"hdhomerun_local"]; 

AAAAA is not AAAAA code, but my personal identifier is from the developer profile.

In the output log, I see that iCloud is detected and no errors occur. I also tried going through the code and it all looks fine.

What am I missing? Do I need to listen to some event? I could not find an example of using MagicalRecord with iCloud.

The MagicalRecord version is:
https://github.com/magicalpanda/MagicalRecord

+6
source share
1 answer

OK, I will answer my question.

MagicalRecord, the moment I used it, did not work with iCloud.

But it was recently fixed by this commit: https://github.com/emrosenf/MagicalRecord/commit/8415276615d9a9e12db9c0207bae373b7397dd56

And now it works fine.

+1
source

Source: https://habr.com/ru/post/905209/


All Articles