{"id":16203351,"url":"https://github.com/sschmid/gummi-dispatcher","last_synced_at":"2025-07-28T18:11:07.469Z","repository":{"id":6308928,"uuid":"7543756","full_name":"sschmid/Gummi-Dispatcher","owner":"sschmid","description":"Observe and dispatch any objects","archived":false,"fork":false,"pushed_at":"2013-03-18T21:23:36.000Z","size":372,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T20:52:12.474Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sschmid.github.com/Gummi-Dispatcher/","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/sschmid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-10T15:52:00.000Z","updated_at":"2023-07-03T16:50:22.000Z","dependencies_parsed_at":"2022-09-13T00:11:53.392Z","dependency_job_id":null,"html_url":"https://github.com/sschmid/Gummi-Dispatcher","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sschmid%2FGummi-Dispatcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sschmid%2FGummi-Dispatcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sschmid%2FGummi-Dispatcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sschmid%2FGummi-Dispatcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sschmid","download_url":"https://codeload.github.com/sschmid/Gummi-Dispatcher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247713952,"owners_count":20983798,"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-10-10T09:53:53.461Z","updated_at":"2025-04-07T19:23:36.844Z","avatar_url":"https://github.com/sschmid.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gummi Dispatcher\n![Gummi Dispatcher Logo](http://sschmid.com/Libs/Gummi-Dispatcher/Gummi-Dispatcher-128.png)\n\n## Description\nObserve and dispatch any objects.\n\n## Features\n* Dispatch any object (no NSNotification like in NSNotificationCenter)\n* Add observers with priority\n* Add observers that get removed after execution (add once)\n\n## How to use Gummi Dispatcher\n\n#### Get a dispatcher\n\n```objective-c\n// Create your own dispatcher\nGDDispatcher *dispatcher = [[GDDispatcher alloc] init];\n\n// or use the shared dispatcher\nGDDispatcher *dispatcher = [GDDispatcher sharedDispatcher];\n```\n\n#### Add observers\n\n```objective-c\n[dispatcher addObserver:self forObject:[Greeting class]\n           withSelector:@selector(doSthLast:) priority:-5];\n\n[dispatcher addObserver:self forObject:[Greeting class]\n           withSelector:@selector(doSthFirst:) priority:10];\n```\n\nYou can add observers that get removed after execution\n\n```objective-c\n[dispatcher addObserverOnce:self forObject:[Greeting class]\n           withSelector:@selector(doSthLast:) priority:-5];\n\n[dispatcher addObserverOnce:self forObject:[Greeting class]\n           withSelector:@selector(doSthFirst:) priority:10];\n```\n\n#### Dispatch objects\n\n```objective-c\n[dispatcher dispatchObject:[[Greeting alloc] initWithString:@\"Hello\"]];\n\n// Logs\n// Got greeting first: Hello\n// Got greeting last: Hello\n```\n\n```objective-c\n- (void)doSthFirst:(Greeting *)greeting {\n    NSLog(@\"Got greeting first: %@\", greeting.string);\n}\n\n- (void)doSthLast:(Greeting *)greeting {\n    NSLog(@\"Got greeting last: %@\", greeting.string);\n}\n```\n\n## Install Gummi Dispatcher\nYou find the source files you need in Gummi-Dispatcher/Classes.\n\n## CocoaPods\nInstall [CocoaPods] (http://cocoapods.org) and add the Gummi Dispatcher reference to your Podfile\n\n```\nplatform :ios, '5.0'\n  pod 'Gummi-Dispatcher'\nend\n```\n\n#### Add this remote\n```\n$ pod repo add sschmid-cocoapods-specs https://github.com/sschmid/cocoapods-specs\n```\n\n#### Install Gummi Dispatcher\n\n```\n$ cd path/to/project\n$ pod install\n```\nOpen the created Xcode Workspace file.\n\n## Projects that use Gummi Dispatcher\n* [Gummi Commander] (https://github.com/sschmid/Gummi-Commander) Event Command Mapping System for Objective-C\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsschmid%2Fgummi-dispatcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsschmid%2Fgummi-dispatcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsschmid%2Fgummi-dispatcher/lists"}