Posts

Post marked as solved
1 Replies
430 Views
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) }
Posted
by matovsky.
Last updated
.
Post marked as solved
2 Replies
394 Views
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?
Posted
by matovsky.
Last updated
.
Post marked as solved
1 Replies
375 Views
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?
Posted
by matovsky.
Last updated
.
Post marked as solved
2 Replies
305 Views
I am done with my tvOS app. But I don't have physical Apple TV. However, it is necessary if I want to distribute my app. Currently, Apple TV has already sold out in my country. Can anybody borrow the UDID of Apple TV? 😅
Posted
by matovsky.
Last updated
.
Post not yet marked as solved
2 Replies
335 Views
I have a game with SpriteKit for iPhone, iPad and Mac. I am gonna make for Apple TV. But I take it override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { doesn't work for tvOS. Then what I am supposed to use to make my buttons selectable and I can press ones?
Posted
by matovsky.
Last updated
.