---
title: next()
framework: cloudkit
role: symbol
role_heading: Instance Method
path: cloudkit/ckrecordkeyvalueiterator/next()
---

# next()

Advances the iterator and returns the next key-value pair from the record.

## Declaration

```swift
mutating func next() -> (CKRecord.FieldKey, any CKRecordValueProtocol)?
```

## Return Value

Return Value The next key-value pair from the record, or nil if there are no more keys.
