Thanks for the code. Comments are messing code presentation, it is better to post in a new reply:
| @Published var checkedInProfiles: [CKRecord.ID: Int] = [:] |
| |
| func getCheckedInCounts() { |
| ckController.database.fetchCheckedInProfilesCount(with: RecordType.profile) { (results, moreComing, error) in |
| DispatchQueue.main.async { [self] in |
| checkedInProfiles = results |
| } |
| } |
| |
| } |
So I assume you get the error in
checkedInProfiles = results
Most likely, results in fetchCheckedInProfilesCount is a [CKRecord], hence a mismatch.
Could you confirm by showing fetchCheckedInProfilesCount func ?