See nothing when I use CloudKit cursor. Where is a problem?

I am using the CloudKit cursor in my app and the cursor works because I can see it from the print (cursor code: https://controlc.com/0d42933b). However, I see nothing on the map (I am using MapKit, CloudKit, and SwiftUI in my project). Below is my View Model:

…
func fetchLocations() {
        ckController.database.fetchRecords(with: RecordType.location) { (results, moreComing, error) in
            print("fetchRecords: results.count = \(results.count), moreComing = \(moreComing), error = \(String(describing: error))")
            if !moreComing {
                DispatchQueue.main.async { [self] in
                    objects = results                    
                }
            }
        }
 }
…

Below is my implementation in the view:

…
.task {
     if locationManager.locations.isEmpty {
         viewModel.fetchLocations()
     }
 }
…

Print (I have 155 records):

fetchRecords: results.count = 1, moreComing = true, error = nil fetchRecords: results.count = 2, moreComing = true, error = nil

fetchRecords: results.count = 155, moreComing = true, error = nil fetchRecords: results.count = 155, moreComing = false, error = nil

Somebody knows solutions? Where is a mistake and how I can see all my elements on the map finally?

Answered by matovsky in 698707022

Closed.

Where is a mistake It is very likely your mistake exists somewhere not yet shown. Without showing enough code, nobody would be able to show how to fix. By the way, you should better respond to comments to make good communication in the dev forums.

Accepted Answer

Closed.

See nothing when I use CloudKit cursor. Where is a problem?
 
 
Q