Post

Replies

Boosts

Views

Activity

Wrong NSFetchedResultsChangeType in delegate call
I change one property of an item (not a property in the sort descriptors) in CloudKit Dashboard. When I receive the notification by CloudKit if it is not the first row of the section it gives an .update type (which is correct). But when the row that should be updated is the first one in any section it gives a .move type (which doesn't refresh my cell). this is my delegate method: func controller(_ controller: NSFetchedResultsController<NSFetchRequestResult>, didChange anObject: Any, at indexPath: IndexPath?, for type: NSFetchedResultsChangeType, newIndexPath: IndexPath?) { switch type {         case .insert:             tableView.insertRows(at: [newIndexPath!], with: .fade)         case .delete:             tableView.deleteRows(at: [indexPath!], with: .fade)         case .update:             tableView.reloadRows(at: [newIndexPath!], with: .automatic)         case .move:             tableView.moveRow(at: indexPath!, to: newIndexPath!)         default:             return         } }
0
0
359
Oct ’20
CloudKitPersistentContainer notifications issues
Hi the problem I have is that when my app is open on multiple devices it doesn't always receive or send CloudKit notifications. (Just pressing home button and reopen the app triggers a refresh but I want my app to be "live" even if it is always open) I have also tried to do some updates on cloudkit records from the dashboard, but even there I get the same problem The strange thing is that sometimes it works perfectly while sometimes it doesn't. What I want to ask is if this is normal or if I have to continue searching for a problem in my app. Thank you so much!
3
0
550
Jul ’20