{"id":21995672,"url":"https://github.com/alexdrone/pushid","last_synced_at":"2025-07-25T05:06:23.452Z","repository":{"id":147419851,"uuid":"91252572","full_name":"alexdrone/PushID","owner":"alexdrone","description":"Robust and thread-safe generator for uuids with guaranteed chronological ordering in Swift.","archived":false,"fork":false,"pushed_at":"2019-11-27T20:36:30.000Z","size":9,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-30T17:43:27.702Z","etag":null,"topics":["firebase","push-id","swift","uuid","uuid-generator"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexdrone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-05-14T15:25:08.000Z","updated_at":"2024-09-17T19:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1e5f90d-be94-4720-9f1d-a637cf5a6a63","html_url":"https://github.com/alexdrone/PushID","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alexdrone/PushID","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdrone%2FPushID","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdrone%2FPushID/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdrone%2FPushID/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdrone%2FPushID/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexdrone","download_url":"https://codeload.github.com/alexdrone/PushID/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexdrone%2FPushID/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266959620,"owners_count":24012530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firebase","push-id","swift","uuid","uuid-generator"],"created_at":"2024-11-29T21:18:06.171Z","updated_at":"2025-07-25T05:06:23.444Z","avatar_url":"https://github.com/alexdrone.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PushID\n[![Swift](https://img.shields.io/badge/swift-5.1-orange.svg?style=flat)](#)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://opensource.org/licenses/MIT)\n\n\nRobust and thread-safe generator for UUIDs with guaranteed chronological ordering based on [Firebase's PushID](https://firebase.googleblog.com/2015/02/the-2120-ways-to-ensure-unique_68.html).\n\nID generator that creates 20-character string identifiers with the following properties:\n  1. They're based on timestamp so that they sort *after* any existing ids.\n  2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs.\n  3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly).\n  4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the latter ones will sort after the former ones.  We do this by using the previous random bits but \"incrementing\" them by 1 (only in the case of a timestamp collision).\n  \n \n ### Usage\n \n``` swift\nlet id = makePushID() //-Kk6Xfa37VrgLYFtTygJ\n```\n\n### Credit\n\nOriginal javascript implementation [here](https://gist.github.com/mikelehen/3596a30bd69384624c11).\n\n### Other languages\n\n[C](https://gist.github.com/whatvn/15f5266d59320113d978) | \n[Java](https://gist.github.com/swftvsn/438b4ed68619ad1f5d1c251dc3a5af6f) |\n[Go](https://github.com/kjk/betterguid) | \n[C#](https://gist.github.com/kiliman/ca1d9f4135078a6b24c5005113bbeea4) | \n[Obj-C](https://gist.github.com/kcmoffat/af856ab4b605a00216d3b5f627e50a84) | \n[Typescript](https://gist.github.com/episage/0fa8fcf71a28985197c9ba1d51f84408) | \n[Ruby](https://gist.github.com/azell/b96d27e4091f5a966bae) | \n[Python](https://gist.github.com/risent/4cab3878d995bec7d1c2) | \n[Elm](https://github.com/ryanucode/firebase-effect-manager) | \n[SQL](https://gist.github.com/DimuDesigns/2fd0adf5b56a5ebf7cc27f64bff13fd2) | \n[Lua](https://github.com/tst2005/lua-firebase_pushid/blob/master/firebase_pushid.lua)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdrone%2Fpushid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexdrone%2Fpushid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexdrone%2Fpushid/lists"}