Post

Replies

Boosts

Views

Activity

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?
2
0
697
Oct ’21
Cursor in CloudKit does not work. Where is mistake?
I’m trying to make cursor the right way. But it doesn’t work. If I set limit 5, then I can see only 5 records, even I move my finger on the map (I’m using MapKit with CloudKit). If 200 then 200, but have to wait for very long time. I’m sure my cursor is wrong. Who can help me? func getLocation(completed: @escaping (Result<[AppLocation], Error>) -> Void) {      let sortDescriptor = NSSortDescriptor(key: AppLocation.kName, ascending: true)      let query = CKQuery(recordType: RecordType.location, predicate: NSPredicate(value: true))      query.sortDescriptors = [sortDescriptor]      let operation = CKQueryOperation(query: query)      operation.resultsLimit = 5      operation.query = query      operation.queuePriority = .veryHigh      operation.qualityOfService = .userInteractive      var locations = [AppLocation]()            operation.recordFetchedBlock = { record in        let location = AppLocation(record: record)        locations.append(location)      }      operation.queryCompletionBlock = { (cursor, error) in        DispatchQueue.main.async {          if let error = error {            completed(.failure(error))          } else {            completed(.success(locations))          }        }      }      CKContainer.default().publicCloudDatabase.add(operation) }
2
0
782
Sep ’21
Can see App Clips banner only when app is installed
I can see App Clips banner only when app is installed. But see nothing when isn't installed. My .well-known/apple-app-site-association file: &#9;"applinks": { &#9;&#9;&#9;"apps": [], &#9;&#9;&#9;"details": [ &#9;&#9;&#9;&#9;&#9; { &#9;&#9;&#9;&#9;&#9;&#9; "appID":&#9;"ABCDEFG.com.mywebsite.MYAPP", &#9;&#9;&#9;&#9;&#9;&#9; "components": [ &#9;&#9;&#9;&#9;&#9;&#9;&#9; { &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;"/": "/abc", &#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;&#9;"comment": "Matches any URL" &#9;&#9;&#9;&#9;&#9;&#9;&#9; } &#9;&#9;&#9;&#9;&#9;&#9;&#9; ] &#9;&#9;&#9;&#9;&#9; } &#9;&#9;&#9; ] &#9; }, &#9; "webcredentials": { &#9;&#9;&#9;"apps": [ "ABCDEFG.com.mywebsite.MYAPP" ] &#9; }, &#9;&#9;"appclips": { &#9;&#9;&#9;&#9;"apps": ["ABCDEFG.com.mywebsite.MYAPP.Clip"] &#9;&#9;} } Associated Domains in the app target and App Clips target are the same: webcredentials, applinks and appclips with my domain. On the App Store Connect domain Validated and Advanced App Clip Experiences is created. Banner on the website: <meta name="apple-itunes-app" content="app-id=1234567890, app-clip-bundle-id=com.mywebsite.MYAPP.Clip"> Where can be a problem?
2
0
669
Oct ’20