Hi,
I am trying to fetch CKShare for NSManagedObject. Firstly I get CKRecord for it using NSPersistentCloudKitContainer's record(for:) method. And getting situation when:
But it increase awaiting time twice because I need to get response for correct CKRecord and then fetch CKShare for it. If no share for CKRecord, I could get that nil immediately but now I have to fetch correct updated CKRecord.
So, anyone know how to keep local database updated as expected without call Notification Center or minimising an app?
I am trying to fetch CKShare for NSManagedObject. Firstly I get CKRecord for it using NSPersistentCloudKitContainer's record(for:) method. And getting situation when:
First time record(for:) gives correct CKRecord
I successfully create CKShare, see it in online Dashboard
Next time record(for:) gives old CKRecord which don't have share yet, it's outdated!
I swipe down notification Notification Center or minimise the app (go to home screen), and when go back, database is being immediately updated and record(for:) returns correct CKRecord with existing share now.
But it increase awaiting time twice because I need to get response for correct CKRecord and then fetch CKShare for it. If no share for CKRecord, I could get that nil immediately but now I have to fetch correct updated CKRecord.
So, anyone know how to keep local database updated as expected without call Notification Center or minimising an app?