Latest 1.0.0
Homepage https://github.com/benjohnde/NanoidSwift
License MIT
Platforms ios 9.0, requires ARC
Authors

Straight forward nanoid implementation for Swift.

Usage

import Nanoid

let nanoid = Nanoid.init()
nanoid.length = 8 // defaults to `32`
nanoid.alphabet = .full // defaults to `.alphameric`
print(nanoid.secureToken)

Installation

Via Carthage

Nanoid can be installed using Carthage. After installing Carthage just add Nanoid to your Cartfile as follows:

github "benjohnde/NanoidSwift" ~> 1.0

Via CocoaPods

CocoaPods is a dependency manager for Swift and Objective-C Cocoa projects. After installing CocoaPods add NanoidSwift to your Podfile:

platform :ios, '9.0'
pod 'NanoidSwift', '~> 1.0.0'

Hints

  • Currently limited to /dev/urandom, additional sources may be added later on.
  • Alphabet contains a convenience method for symbols, these may change.

Latest podspec

{
    "name": "NanoidSwift",
    "version": "1.0.0",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "summary": "Straight forward nanoid implementation for Swift.",
    "homepage": "https://github.com/benjohnde/NanoidSwift",
    "authors": {
        "Ben John": "[email protected]"
    },
    "social_media_url": "http://twitter.com/benjohnde",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.2",
    "source": {
        "git": "https://github.com/benjohnde/NanoidSwift.git",
        "tag": "1.0.0"
    },
    "source_files": "Sources/**/*.{swift}",
    "requires_arc": true
}

Pin It on Pinterest

Share This