A Swift library for generating random data types, fake human information, and test content.
SwiftRandom is a Swift library that provides a suite of utilities for generating random data, including primitive types, fake human information, and test content. It solves the problem of manually creating random or mock data for development, testing, and prototyping in iOS and macOS applications.
Swift developers building iOS or macOS apps who need to generate random data for testing, prototyping, or populating user interfaces with mock content.
Developers choose SwiftRandom for its simplicity, comprehensive feature set, and seamless integration via both extension methods and static APIs, reducing boilerplate code for data generation tasks.
A tiny generator of random data for swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides both extension methods (e.g., Int.random(2, 77)) and static functions (e.g., Randoms.randomFakeName()), making it intuitive and reducing boilerplate code.
Supports random generation for common Swift and UIKit types including Int, Double, UIColor, NSDate, and NSURL, covering many development and testing needs.
Includes utilities for generating realistic fake names, genders, conversations, and titles, ideal for populating test datasets as shown in the examples.
Offers methods to fetch random Gravatar images with customizable styles via network calls, useful for avatar placeholders in UI testing.
Fake human data appears English-centric based on examples like names and honorifics, lacking support for other languages or cultures without customization.
Gravatar image fetching requires an internet connection, which can fail in offline testing environments and adds external reliance.
README specifies Swift 2.0, but modern projects use newer versions; this may cause compatibility problems without updates or forks.