{"id":16702333,"url":"https://github.com/jagcesar/cloudkitcurrentuser","last_synced_at":"2025-04-10T04:33:20.939Z","repository":{"id":145181339,"uuid":"75430135","full_name":"JagCesar/CloudKitCurrentUser","owner":"JagCesar","description":"The easiest way to keep track of the current iCloud user","archived":false,"fork":false,"pushed_at":"2019-06-25T16:35:09.000Z","size":36,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2025-03-24T05:43:57.715Z","etag":null,"topics":[],"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/JagCesar.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}},"created_at":"2016-12-02T20:53:58.000Z","updated_at":"2019-12-01T03:32:09.000Z","dependencies_parsed_at":"2024-04-19T07:01:07.121Z","dependency_job_id":null,"html_url":"https://github.com/JagCesar/CloudKitCurrentUser","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagCesar%2FCloudKitCurrentUser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagCesar%2FCloudKitCurrentUser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagCesar%2FCloudKitCurrentUser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JagCesar%2FCloudKitCurrentUser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JagCesar","download_url":"https://codeload.github.com/JagCesar/CloudKitCurrentUser/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248157636,"owners_count":21057045,"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","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":[],"created_at":"2024-10-12T18:47:35.167Z","updated_at":"2025-04-10T04:33:20.927Z","avatar_url":"https://github.com/JagCesar.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CloudKitCurrentUser\n\n[![Build Status](https://app.bitrise.io/app/d9b9c1de80d7d8ca/status.svg?token=HZLEAGrqtAiYdksFatF2Xg\u0026branch=master)](https://app.bitrise.io/app/d9b9c1de80d7d8ca)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n[![CloudKitCurrentUser](https://img.shields.io/badge/platform-iOS%20%7C%20macOS-lightgrey.svg?style=flat)](https://github.com/JagCesar/CloudKitCurrentUser)\n[![License](https://img.shields.io/badge/license-MIT-AA8DF8.svg?style=flat)](https://github.com/JagCesar/CloudKitCurrentUser/blob/master/LICENSE)\n[![Language](https://img.shields.io/badge/language-Swift%203-E05C43.svg?style=flat)](https://swift.org)\n[![Twitter](https://img.shields.io/badge/twitter-@JagCesar-00ACED.svg?style=flat)](http://twitter.com/JagCesar)\n\n## Purpose\n\nCloudKitCurrentUser is a wrapper around CloudKit that helps out to keep track of the current user signed in state.\n\n## Features\n\n- [x] Asyncronous loading of signed in state\n- [x] Automatic refresh of signed in state\n- [x] Caching of signed in state\n- [x] Notification when the user signed in status changes\n\n## Requirements\n\n- iOS 9.0+\n- Xcode 8.1+\n- Swift 3.0+\n\n## Installation\n\n### Carthage\n\nThe best way to install CloudKitCurrentUser to your project is to use Carthage. To add this dependency to your project you enter the following in your Cartfile:\n\n`github \"JagCesar/CloudKitCurrentUser\"`\n\nTake a look at the [documentation](https://github.com/Carthage/Carthage#installing-carthage) for more information on how you set up Carthage.\n\n## Usage\n\nFirst of all you have to import CloudKitCurrentUser to your current file. To do that you add the following at the top of your swift file:\n\n```\nimport CloudKitCurrentUser\n```\n\nTo get the status of the current user you just call the `currentStatus` function, like this:\n\n```\nCurrentUser.sharedInstance.currentStatus { status, error in\n\t// Act accordingly here\n}\n```\n\nAnd to get the current user identifier, you write the following:\n\n```\nCurrentUser.sharedInstance.userIdentifier { identifier, error in\n\t// Act accordingly\n}\n```\n\n## Get in touch\n\nFeel free to get in touch if you have any questions. I'm available on Twitter as [@JagCesar](http://twitter.com/JagCesar).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagcesar%2Fcloudkitcurrentuser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjagcesar%2Fcloudkitcurrentuser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjagcesar%2Fcloudkitcurrentuser/lists"}