---
title: next()
framework: swift
role: symbol
role_heading: Instance Method
path: swift/randomnumbergenerator/next()
---

# next()

Returns a value from a uniform, independent distribution of binary data.

## Declaration

```swift
mutating func next() -> UInt64
```

## Return Value

Return Value An unsigned 64-bit random value.

## Discussion

Discussion Use this method when you need random binary data to generate another value. If you need an integer value within a specific range, use the static random(in:using:) method on that integer type instead of this method.

## See Also

### Generating Random Binary Data

- [next(upperBound:)](swift/randomnumbergenerator/next(upperbound:).md)
