Swiftpack.co - Package - lukaskubanek/LoremSwiftum

LoremSwiftum

LoremSwiftum is a lightweight lorem ipsum generator for iOS and macOS written in Swift. It supports generating following random texts: words, sentences, paragraphs, titles, names, email addresses, URLs and tweets. Originally, this library was created as a Swift port of LoremIpsum written in Objective-C.

Requirements

  • Swift 4.0-4.2
  • Xcode 9.2+
  • iOS 8.0+ / OS X 10.10+

Installation

The library is distributed as a Swift framework and can be integrated into your project in following ways:

Carthage

If you use Carthage for managing your dependencies, put LoremSwiftum into your Cartfile:

github "lukaskubanek/LoremSwiftum"

Then, drag either the LoremSwiftum.xcodeproj or the LoremSwiftum.framework into your project/workspace and link your target against the LoremSwiftum.framework. Also make sure that the framework gets copied to your application bundle.

Git Submodules

Yet another option is using Git submodules and integrating the Xcode project LoremSwiftum.xcodeproj from the submodule directly to your Xcode workspace.

Usage

import LoremSwiftum

Lorem.word
// => One random word

Lorem.words(3)
// => Three random words

Lorem.sentence
// => One random sentence

Lorem.sentences(3)
// => Three random sentences

Lorem.paragraph
// => One random paragraph

Lorem.paragraphs(3)
// => Three random paragraphs

Lorem.title
// => A random title

Lorem.firstName
// => A random first name

Lorem.lastName
// => A random last name

Lorem.fullName
// => A random full name

Lorem.emailAddress
// => A random email address

Lorem.url
// => A random URL

Lorem.shortTweet
// => A random short tweet

Lorem.tweet
// => A random long tweet

Author

Lukas Kubanek // lukaskubanek.com // @kubanekl

License

LoremSwiftum is released under the MIT License.

Github

link
Stars: 55
Help us keep the lights on

Dependencies

Used By

Total: 0

Releases

v2.0.0 - Oct 15, 2018

  • Updated to Swift 4 and Xcode 10
  • Changes from version 2.0.0 β1
  • Added support for long tweets and HTTPS URL scheme (thanks to @sushinoya)
  • Some under the hood improvements

v2.0.0-beta - Aug 29, 2017

  • Updated to work with Swift 4 and Xcode 9 beta 6
  • Tweaked the API a bit
  • Removed support for generating Date and URL objects
  • Version 2.0.0 will be released once Swift 4 will be ready

v1.1.0 - Sep 24, 2016

v1.0.0 - Oct 21, 2015

  • Updated to Swift 2.0
  • Added OS X target
  • Removed support for images
  • Cleaned up the API

v0.1.0 - Nov 28, 2014