{"id":19809518,"url":"https://github.com/space-code/service-locator","last_synced_at":"2025-09-12T21:41:17.660Z","repository":{"id":222354682,"uuid":"756203583","full_name":"space-code/service-locator","owner":"space-code","description":"service-locator is a framework written in Objective-C that implements a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer","archived":false,"fork":false,"pushed_at":"2024-02-13T19:18:25.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T03:03:39.089Z","etag":null,"topics":["service-locator","service-locator-pattern"],"latest_commit_sha":null,"homepage":"","language":"Objective-C","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/space-code.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-02-12T07:23:47.000Z","updated_at":"2024-02-13T19:21:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"309c7e9f-0a03-4e17-9216-9473e8a5d90b","html_url":"https://github.com/space-code/service-locator","commit_stats":null,"previous_names":["space-code/service-locator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/space-code/service-locator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fservice-locator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fservice-locator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fservice-locator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fservice-locator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/space-code","download_url":"https://codeload.github.com/space-code/service-locator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/space-code%2Fservice-locator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274880473,"owners_count":25367101,"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-09-12T02:00:09.324Z","response_time":60,"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":["service-locator","service-locator-pattern"],"created_at":"2024-11-12T09:17:15.146Z","updated_at":"2025-09-12T21:41:17.561Z","avatar_url":"https://github.com/space-code.png","language":"Objective-C","readme":"\u003ch1 align=\"center\" style=\"margin-top: 0px;\"\u003eservice-locator\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://cocoapods.org/pods/ServiceLocator\"\u003e\u003cimg alt=\"CodeCov\" src=\"https://img.shields.io/cocoapods/v/ServiceLocator.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/ServiceLocator\"\u003e\u003cimg alt=\"CodeCov\" src=\"https://img.shields.io/cocoapods/l/ServiceLocator.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://cocoapods.org/pods/ServiceLocator\"\u003e\u003cimg alt=\"CodeCov\" src=\"https://img.shields.io/cocoapods/p/ServiceLocator.svg?style=flat\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/space-code/service-locator\"\u003e\u003cimg alt=\"CI\" src=\"https://github.com/space-code/service-locator/actions/workflows/ci.yml/badge.svg?branch=main\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/space-code/service-locator\"\u003e\u003cimg alt=\"CodeCov\" src=\"https://codecov.io/github/space-code/service-locator/graph/badge.svg?token=ZVqs36MzGZ\"\u003e\u003c/a\u003e \n\u003c/p\u003e\n\n## Description\n`service-locator` is a framework written in Objective-C that implements a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer.\n\n- [Usage](#usage)\n- [Requirements](#requirements)\n- [Communication](#communication)\n- [Contributing](#contributing)\n- [Author](#author)\n- [License](#license)\n\n## Usage\n\n1. Define a protocol:\n\n```objc\n@protocol MyProtocol\n@end\n```\n\n2. Define a class that conforms to this protocol:\n\n```objc\n@interface MyClass: NSObject \u003cMyProtocol\u003e\n@end\n```\n\n3. Register an object in a registry:\n\n```objc\n#import \u003cServiceLocator/ServiceLocator.h\u003e\n\n[[NVRegistry sharedInstance] register:@protocol(MyProtocol) scope:NVRegistryScopePrototype factory:factory:^id _Nonnull {\n    return [[MyClass alloc] init];\n}];\n```\n\n4. Resolve an object based on a protocol:\n\n```objc\n#import \u003cServiceLocator/ServiceLocator.h\u003e\n\nMyClass *myClass = [[NVRegistry sharedInstance] resolve:@protocol(MyProtocol)];\n```\n\n## Requirements\n- iOS 12.0 / macOS 10.14+ / tvOS 12.0 / watchOS 6.0\n- Xcode 15.0\n\n## Communication\n- If you **found a bug**, open an issue.\n- If you **have a feature request**, open an issue.\n- If you **want to contribute**, submit a pull request.\n\n## Contributing\nBootstrapping development environment\n\n```\nmake bootstrap\n```\n\nPlease feel free to help out with this project! If you see something that could be made better or want a new feature, open up an issue or send a Pull Request!\n\n## Author\nNikita Vasilev, nv3212@gmail.com\n\n## License\nservice-locator is available under the MIT license. See the LICENSE file for more info.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Fservice-locator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspace-code%2Fservice-locator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspace-code%2Fservice-locator/lists"}