Home

Awesome

Universally Unique Lexicographically Sortable Identifier

Carthage Compatible CocoaPods Compatible SwiftPM Compatible <a href="https://github.com/whitesmith/ulid/actions"> <img src="https://github.com/whitesmith/ulid/workflows/Push/badge.svg" /> </a> License MIT

Objective-C wrapper of the C++ library

Usage

Objective-C

#import <ULID/ULID.h>

NSLog(@"%@", [[ULID new] ulidString]);

Swift:

import ULID

print(ULID().ulidString)

Requirements

Specification

Below is the current specification of ULID as implemented in this repository.

Note: the binary format has not been implemented.

 01AN4Z07BY      79KA1307SR9X4MV3

|----------|    |----------------|
 Timestamp          Randomness
   48bits             80bits

Installation

<img src="https://cloud.githubusercontent.com/assets/432536/5252404/443d64f4-7952-11e4-9d26-fc5cc664cb61.png" width="24" height="24"> Carthage

To install it, simply add the following line to your Cartfile:

github "whitesmith/ulid"

Then run carthage update.

Follow the current instructions in Carthage's README for up to date installation instructions.

<img src="https://raw.githubusercontent.com/ricardopereira/resources/master/img/cocoapods.png" width="24" height="24"> CocoaPods

To install it, simply add the following line to your Podfile:

pod 'ULID'

Then run pod install with CocoaPods 1.0 or newer.

Contributing

The best way to contribute is by submitting a pull request. We'll do our best to respond to your patch as soon as possible. You can also submit a new GitHub issue if you find bugs or have questions.

Whitesmith