{"id":21095885,"url":"https://github.com/jrsaruo/propertyaccessor","last_synced_at":"2025-12-29T12:59:52.388Z","repository":{"id":196348026,"uuid":"695799052","full_name":"jrsaruo/PropertyAccessor","owner":"jrsaruo","description":"An accessor macro that adds the getter and the setter to the property.","archived":false,"fork":false,"pushed_at":"2023-09-24T10:13:07.000Z","size":16,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-21T01:45:32.515Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jrsaruo.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}},"created_at":"2023-09-24T09:03:54.000Z","updated_at":"2023-09-29T11:05:51.000Z","dependencies_parsed_at":"2023-09-24T17:32:18.877Z","dependency_job_id":null,"html_url":"https://github.com/jrsaruo/PropertyAccessor","commit_stats":null,"previous_names":["jrsaruo/propertyaccessor"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrsaruo%2FPropertyAccessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrsaruo%2FPropertyAccessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrsaruo%2FPropertyAccessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrsaruo%2FPropertyAccessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrsaruo","download_url":"https://codeload.github.com/jrsaruo/PropertyAccessor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243538134,"owners_count":20307104,"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-11-19T22:30:01.079Z","updated_at":"2025-12-29T12:59:52.363Z","avatar_url":"https://github.com/jrsaruo.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PropertyAccessor\n\nAn accessor macro that adds the getter and the setter to the property.\n\n## Requirements\n\n- iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 6.0+\n- Xcode 15+\n- Swift 5.9+\n\n## Usage\n\n```swift\nfinal class CustomView: UIView {\n    private let titleLabel = UILabel()\n\n    @Accessor(to: \\Self.titleLabel.text)\n    var title: String?\n\n    /*\n    Expanded to:\n    \n    var title: String? {\n        get {\n            self[keyPath: \\Self.titleLabel.text]\n        }\n        set {\n            self[keyPath: \\Self.titleLabel.text] = newValue\n        }\n    }\n    */\n}\n```\n\n## Using PropertyAccessor in your project\n\nTo use the `PropertyAccessor` library in a SwiftPM project, add the following line to the dependencies in your `Package.swift` file:\n\n```swift\n.package(url: \"https://github.com/jrsaruo/PropertyAccessor\", from: \"1.0.0\"),\n```\n\nand add `PropertyAccessor` as a dependency for your target:\n\n```swift\n.target(name: \"\u003ctarget\u003e\", dependencies: [\n    .product(name: \"PropertyAccessor\", package: \"PropertyAccessor\"),\n    // other dependencies\n]),\n```\n\nFinally, add `import PropertyAccessor` in your source code.\n\n\u003e [!NOTE]\n\u003e You may see an alert that says “'PropertyAccessorMacros' must be enabled before it can be used. Enable it now?” so you will have to trust and enable it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrsaruo%2Fpropertyaccessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrsaruo%2Fpropertyaccessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrsaruo%2Fpropertyaccessor/lists"}