{"id":28185725,"url":"https://github.com/vsanthanam/weakreference","last_synced_at":"2026-05-16T13:02:41.759Z","repository":{"id":38084441,"uuid":"483370840","full_name":"vsanthanam/WeakReference","owner":"vsanthanam","description":"An existential weak reference wrapper for Swift","archived":false,"fork":false,"pushed_at":"2025-03-30T15:01:30.000Z","size":224,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T21:51:24.500Z","etag":null,"topics":["ios","macos","spm","swift","tvos","watchos","weak","xcode"],"latest_commit_sha":null,"homepage":"https://weak.tools","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/vsanthanam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-19T18:50:58.000Z","updated_at":"2025-03-30T15:01:33.000Z","dependencies_parsed_at":"2022-08-28T23:03:36.660Z","dependency_job_id":null,"html_url":"https://github.com/vsanthanam/WeakReference","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/vsanthanam/WeakReference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FWeakReference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FWeakReference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FWeakReference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FWeakReference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsanthanam","download_url":"https://codeload.github.com/vsanthanam/WeakReference/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsanthanam%2FWeakReference/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265643210,"owners_count":23804044,"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":["ios","macos","spm","swift","tvos","watchos","weak","xcode"],"created_at":"2025-05-16T06:12:33.590Z","updated_at":"2026-05-16T13:02:41.679Z","avatar_url":"https://github.com/vsanthanam.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WeakReference\n\n[![MIT License](https://img.shields.io/github/license/vsanthanam/WeakReference)](https://github.com/vsanthanam/WeakReference/blob/main/LICENSE)\n[![Package Releases](https://img.shields.io/github/v/release/vsanthanam/WeakReference)](https://github.com/vsanthanam/WeakReference/releases)\n[![Build Status](https://img.shields.io/github/check-runs/vsanthanam/WeakReference/main)](https://github.com/vsanthanam/WeakReference/actions)\n[![Swift Version](https://img.shields.io/badge/swift-6.0-critical)](https://swift.org)\n[![Supported Platforms](https://img.shields.io/badge/platform-iOS%2012%20%7C%20macOS%2010.14%20%7C%20tvOS%2012%20%7C%20watchOS%205%20%7C%20visionOS%201-lightgrey)](https://developer.apple.com)\n\nAn existential weak reference.\nUse this wrapper class to pass around weakly-referenced instances of an object.\n\n## Installation\n\nWeakReference is currently distributed exclusively through the [Swift Package Manager](https://www.swift.org/package-manager/). \n\nTo add WeakReference as a dependency to an existing Swift package, add the following line of code to the `dependencies` parameter of your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(\n        url: \"https://github.com/vsanthanam/WeakReference.git\",\n        from: \"2.0.0\"\n    )\n]\n```\n\nTo add WeakReference as a dependency to an Xcode Project:\n\n* Choose `File` → `Add Packages...`\n* Enter package URL `https://github.com/vsanthanam/WeakReference.git` and select your release and of choice.\n\nOther distribution mechanisms like CocoaPods or Carthage may be added in the future.\n\nAdditional installation instructions are available on the [Swift Package Index](https://swiftpackageindex.com/vsanthanam/WeakReference)\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fvsanthanam%2FWeakReference%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/vsanthanam/WeakReference)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fvsanthanam%2FWeakReference%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/vsanthanam/WeakReference)\n\n## Usage\n\n```swift\nimport WeakReference\n\nvar obj: MyObj? = .init( ... )\nlet weakReference = weak(obj!)\n\nassert(weakReference.obj != nil)\n\nobj = nil\n\nassert(weakReference.obj == nil)\n```\n\nSee the [complete documentation](https://weak.tools/docs/documentation/weakreference/) for more information.\n\n## License\n\n**WeakReference** is available under the MIT license. See the LICENSE file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsanthanam%2Fweakreference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsanthanam%2Fweakreference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsanthanam%2Fweakreference/lists"}