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)
- Host: GitHub
- URL: https://github.com/whitesmith/ulid
- Owner: whitesmith
- License: mit
- Created: 2017-02-14T23:45:09.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2021-06-20T18:03:56.000Z (almost 4 years ago)
- Last Synced: 2025-03-01T05:46:01.826Z (4 months ago)
- Topics: framework, ios, library, macos, ulid
- Language: C++
- Homepage: https://www.reddit.com/r/programming/comments/4vo5a6/ulid_an_alternative_to_uuids/
- Size: 65.4 KB
- Stars: 12
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Universally Unique Lexicographically Sortable Identifier
[](https://github.com/Carthage/Carthage)
[](https://cocoapods.org/pods/WSTagsField)
[](https://swift.org/package-manager)
![]()
[](https://opensource.org/licenses/MIT)#### Objective-C wrapper of the [C++ library](https://github.com/suyash/ulid)
## Usage
**Objective-C**
```objective-c
#importNSLog(@"%@", [[ULID new] ulidString]);
```**Swift:**
```swift
import ULIDprint(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.
