Yichen Zhou
Yichen Zhou

Reputation: 446

CloudKit Issue: did not find required record type

My Situation:

enter image description here

The thing worth be mentioned that the CardModel is a Recode Types in the CloudKit Dashboard.

My Code:

   let delegate = UIApplication.sharedApplication().delegate as! AppDelegate
   let predicate = NSPredicate(value: true)
   let query = CKQuery(recordType: "CardModel", predicate: predicate)
   self.privateDB.performQuery(query, inZoneWithID: nil) {
        results, error in
        if error != nil {
            dispatch_async(dispatch_get_main_queue()) {
                self.delegate?.errorUpdating(error)
                println("error loading: \(error)")
            }


After checking my code, I find the error is submitted by self.privateDB.performQuery(query, inZoneWithID: nil). And the errorUpdating() is the function in it's Class's Protocol Part.


My Question:


A big appreciation for your guide and answer.

Ethan Joe

Upvotes: 0

Views: 1903

Answers (1)

MirekE
MirekE

Reputation: 11555

Did you deploy your data from Development to Production region in CloudKit Dashboard? I suppose TestFlight needs the production database, not development.

Upvotes: 4

Related Questions