{"id":20936498,"url":"https://github.com/eneskaraosman/swinjector","last_synced_at":"2025-07-14T18:33:05.248Z","repository":{"id":215910864,"uuid":"739984487","full_name":"EnesKaraosman/Swinjector","owner":"EnesKaraosman","description":"Simple dependency injection package inspired by get_it Flutter package","archived":false,"fork":false,"pushed_at":"2024-01-11T07:13:36.000Z","size":29,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T21:40:58.541Z","etag":null,"topics":["dependency-injection","getit","injection","ios","swift","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EnesKaraosman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-01-07T06:34:18.000Z","updated_at":"2024-10-12T09:21:11.000Z","dependencies_parsed_at":"2024-01-07T10:51:09.730Z","dependency_job_id":"d683e242-0bbb-4198-84b6-9031550b0ef0","html_url":"https://github.com/EnesKaraosman/Swinjector","commit_stats":null,"previous_names":["eneskaraosman/swinjector"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/EnesKaraosman/Swinjector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwinjector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwinjector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwinjector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwinjector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnesKaraosman","download_url":"https://codeload.github.com/EnesKaraosman/Swinjector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwinjector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265331522,"owners_count":23748430,"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":["dependency-injection","getit","injection","ios","swift","swiftui"],"created_at":"2024-11-18T22:19:58.813Z","updated_at":"2025-07-14T18:33:05.221Z","avatar_url":"https://github.com/EnesKaraosman.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swinjector\n\n[![codecov](https://codecov.io/gh/EnesKaraosman/Swinjector/graph/badge.svg?token=4K5A5TQ9D6)](https://codecov.io/gh/EnesKaraosman/Swinjector)\n\nTODO\n\n- [ ] Easify registering and resolving dependency syntax?\n- [ ] Support registering multiple instance of the same type?\n- [x] Add code documentation\n- [x] Add unit test execution github action\n- [x] Integrate code coverage app (codecov)\n  - [x] Unit test code coverage %100\n\n## Register dependencies\n\n```swift\n// Lazy singleton is created when you access it\nGetIt.I.registerLazySingleton(TestProtocol.self) { TestClass() }\n\n// Singleton is already created by you\nGetIt.I.registerSingleton(TestProtocol.self, instance: TestClass())\n\n// New instance is created every time you access it\nGetIt.I.registerFactory(TestProtocol.self) { TestClass() }\n```\n\n## Access dependencies\n\n```swift\nif let instance = GetIt.I.resolve(TestProtocol.self) {}\n\n// More swifty syntax\nif let instance = GetIt.I(TestProtocol.self) {}\n\n// Access by annotation\n@Injected(TestProtocol.self) var instance\ninstance().foo()\n```\n\n## Check if dependency is registered \u0026 unregister\n```swift\nlet isRegistered = GetIt.I.isRegistered(TestProtocol.self)\n\nGetIt.I.unregister(TestProtocol.self)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswinjector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feneskaraosman%2Fswinjector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswinjector/lists"}