An open API service indexing awesome lists of open source software.

https://github.com/whitesmith/ulid

Universally Unique Lexicographically Sortable Identifier (Objective-C wrapper of the C++ lib)
https://github.com/whitesmith/ulid

framework ios library macos ulid

Last synced: 2 months ago
JSON representation

Universally Unique Lexicographically Sortable Identifier (Objective-C wrapper of the C++ lib)

Awesome Lists containing this project

README

        

# Universally Unique Lexicographically Sortable Identifier

[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage)
[![CocoaPods Compatible](https://img.shields.io/cocoapods/v/ULID.svg)](https://cocoapods.org/pods/WSTagsField)
[![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)](https://swift.org/package-manager)



[![License MIT](https://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat)](https://opensource.org/licenses/MIT)

#### Objective-C wrapper of the [C++ library](https://github.com/suyash/ulid)

## Usage

**Objective-C**

```objective-c
#import

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

**Swift:**

```swift
import ULID

print(ULID().ulidString)
```

### Requirements

- iOS 9.0+
- tvOS 9.0+
- watchOS 2.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]

[Carthage]: https://github.com/Carthage/Carthage

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

```ruby
github "whitesmith/ulid"
```

Then run `carthage update`.

Follow the current instructions in [Carthage's README][carthage-installation]
for up to date installation instructions.

[carthage-installation]: https://github.com/Carthage/Carthage#adding-frameworks-to-an-application

#### [CocoaPods]

[CocoaPods]: http://cocoapods.org

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

```ruby
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](https://github.com/whitesmith/ulid/issues/new) if you find bugs or have questions.

![Whitesmith](http://i.imgur.com/Si2l3kd.png)