title: CloudKit: Fetch all records with a certain record type?
body: <p>I have currently got <strong>CloudKit</strong> set up in my app so that I am adding a new record using the help of the following code below,</p>
  
  <pre><code>CKRecordID *recordID = [[CKRecordID alloc] initWithRecordName:@"stringArray"];
  CKRecord *record = [[CKRecord alloc] initWithRecordType:@"Strings" recordID:recordID];
  [record setObject:[NSArray arrayWithObjects:@"one", @"two", @"three", @"four", nil] forKey:@"stringArray"];
  [_privateDatabase saveRecord:record completionHandler:nil];
  </code></pre>
  
  <p>However, now I would like to be able to fetch ALL records that are of the same record type, "Strings," and return those compiled into an NSArray. How would I go about doing that? Currently, all I have figured out is how to fetch each record individually, using a recordID, which is a hassle, there must be an easier way.</p>
  
  <pre><code>[_privateDatabase fetchRecordWithID:recordID completionHandler:^(CKRecord *record, NSError *error) {
     if (error) {
        // Error handling for failed fetch from private database
     }
     else {
        NSLog(@"ICLOUD TEST: %@", [record objectForKey:@"stringArray"]);            
    }
  }];
  </code></pre>