{"id":17977932,"url":"https://github.com/coderyi/decouplingkit","last_synced_at":"2026-02-27T09:10:33.541Z","repository":{"id":56908331,"uuid":"84607440","full_name":"coderyi/DecouplingKit","owner":"coderyi","description":"decoupling between modules in your iOS Project. iOS模块化过程中模块间解耦方案","archived":false,"fork":false,"pushed_at":"2019-11-21T07:14:17.000Z","size":69,"stargazers_count":140,"open_issues_count":0,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-20T13:32:37.251Z","etag":null,"topics":["cocoapods","coupling","decoupling","ios","mediator","modularization","modules","objective-c","router","service"],"latest_commit_sha":null,"homepage":"https://github.com/coderyi/DecouplingKit","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/coderyi.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}},"created_at":"2017-03-10T22:53:10.000Z","updated_at":"2025-02-19T23:06:46.000Z","dependencies_parsed_at":"2022-08-20T19:50:30.277Z","dependency_job_id":null,"html_url":"https://github.com/coderyi/DecouplingKit","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FDecouplingKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FDecouplingKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FDecouplingKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderyi%2FDecouplingKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderyi","download_url":"https://codeload.github.com/coderyi/DecouplingKit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245500120,"owners_count":20625507,"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":["cocoapods","coupling","decoupling","ios","mediator","modularization","modules","objective-c","router","service"],"created_at":"2024-10-29T17:30:12.664Z","updated_at":"2026-02-27T09:10:33.475Z","avatar_url":"https://github.com/coderyi.png","language":"Objective-C","readme":"# DecouplingKit\n\n\n[![Twitter](https://img.shields.io/badge/twitter-@coderyi9-green.svg?style=flat)](http://twitter.com/coderyi9)\n\n[中文readme](https://github.com/coderyi/DecouplingKit/blob/master/Documents/Readme_cn.md)\n#### Podfile\n\n```ruby\n\n\tplatform :ios, '7.0'\n\tpod 'DecouplingKit', '~\u003e 0.0.2'\n\n```\n\n\n\nDecouplingKit, decoupling between modules in your iOS Project.\n\n\n\n![](https://github.com/coderyi/DecouplingKit/blob/master/Documents/DecouplingKit.png)\n\n\nDDKServiceManager, used to load the service list DKService.plist, the service is a business's  protocol. DKService.plist includes service and impl, service is protocol, impl is the implementation of the protocol class.\n\n\n\n\n\n\nDecouplingKit is based on [BeeHive] (https://github.com/alibaba/BeeHive),  Another way to decouple is the runtime, such as [CTMediator] (https://github.com/casatwy/CTMediator), this is a very good program.\n\n#### Use\n\nRegister the default DKService.plist service list\n\n```\n    [[DKServiceManager sharedInstance] registerLocalServices];\n```\n\nRegister a list of custom paths for services\n\n```\n    [[DKServiceManager sharedInstance] registerLocalServicesWithServiceConfigName:@\"DecouplingKit.bundle/DKService\"];\n\n```\n\nsingleton\n\n```\n    id\u003cBussiness2ServiceProtocol\u003e bussiness2 =[[DKServiceManager sharedInstance] createInstance:@protocol(Bussiness2ServiceProtocol)];\n    \n    NSDictionary *data =[bussiness2 fetchBussiness2DataWithName:@\"DecouplingKit\" age:@\"1\"];\n\n```\n\n\nCreate a class and then call the corresponding class method\n\n```\n   Class Bussiness2 = [[DKServiceManager sharedInstance] createClass:@protocol(Bussiness2ServiceProtocol)];\n\n    [Bussiness2 callClassMethod];\n\n```\n\n\nCreate a service protocol for your business class\n\n```\n@protocol Bussiness2ServiceProtocol \u003cDKServiceProtocol\u003e\n@property (nonatomic,copy) NSString *name;\n- (NSDictionary *)fetchBussiness2DataWithName:(NSString *)name age:(NSString *)age;\n+ (void)callClassMethod;\n\n@end\n\n```\n\n\n\n\n#### Licenses\n\nAll source code is licensed under the [MIT License](https://github.com/coderyi/DecouplingKit/blob/master/LICENSE).\n\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderyi%2Fdecouplingkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderyi%2Fdecouplingkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderyi%2Fdecouplingkit/lists"}