The common interface for all randomization classes in (or usable with) GameplayKit.
SDKs
- iOS 9.0+
- macOS 10.11+
- tvOS 9.0+
Framework
- Gameplay
Kit
Overview
Important
The randomization services provided in GameplayKit are suitable for reliably creating deterministic, pseudorandom gameplay mechanics, but are not cryptographically robust. For cryptography, obfuscation, or cipher uses, use the Security framework, described in Cryptographic Services Guide.
GameplayKit randomization classes include the GKRandom
and GKRandom
classes and their subclasses. You use those classes to generate random behavior for gameplay mechanics, and use this protocol type directly when composing random sources to create more complex randomizers.
For more information on choosing and using randomizers in GameplayKit, read Randomization in GameplayKit Programming Guide.