Swiftpack.co - Package - whitesmith/ulid

Universally Unique Lexicographically Sortable Identifier

Carthage Compatible CocoaPods Compatible SwiftPM Compatible 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

  • iOS 11.0+
  • tvOS 11.0+
  • watchOS 4.0+
  • macOS 10.10+

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

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.

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

Github

link
Stars: 8

Dependencies

Used By

Total: 0

Releases

v1.2.0 - 2020-10-01 16:15:44

  • Added SPM support (#7).

v1.1.0 - 2018-12-21 10:23:00

  • Fix #4: "32bit devices generate wrong timestamp component"

v1.0.4 - 2018-11-23 10:22:41

  • Fix: macOS support.

v1.0.3 - 2018-08-09 11:56:12

  • Fix: Xcode 9.4 warning #5 (thanks @funkyboy)

v1.0.2 - 2017-02-20 20:12:44

  • Fix: Pod spec homepage.

v1.0.1 - 2017-02-20 12:17:47

  • Fix: isEqual implementation.

v1.0.0 - 2017-02-20 12:10:48

First release