Swiftpack.co - lukaskubanek/LoremSwiftum as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by lukaskubanek.
lukaskubanek/LoremSwiftum v2.2.2
A lightweight lorem ipsum generator for Swift
⭐️ 140
🕓 1 week ago
.package(url: "https://github.com/lukaskubanek/LoremSwiftum.git", from: "v2.2.2")

LoremSwiftum

Swift 4.0+ Swift Package Manager Carthage License: MIT Twitter: @lukaskubanek

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

Requirements

  • Swift 4.0+
  • Xcode 9.2+
  • iOS 8.0+ / macOS 10.10+

The Xcode and OS requirements apply only when the library is integrated as a framework or via the Xcode project.

Installation

Swift Package Manager

To install LoremSwiftum using the Swift Package Manager, add it as a dependency into your Package.swift file:

let package = Package(
    ...
    dependencies: [
        .package(url: "https://github.com/lukaskubanek/LoremSwiftum.git", from: "2.2.1")
    ],
    ...
)

Carthage

To install LoremSwiftum using Carthage, add it as a dependency into your Cartfile:

github "lukaskubanek/LoremSwiftum"

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

Git Submodules

You can also install LoremSwiftum via Git submodules and integrate the project LoremSwiftum.xcodeproj from the submodule directly into 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

GitHub

link
Stars: 140
Last commit: 1 week ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

2.2.1: Xcode Project Fix
1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics