{"id":24755239,"url":"https://github.com/katzer/cordova-plugin-app-event","last_synced_at":"2025-10-11T01:31:30.558Z","repository":{"id":57207775,"uuid":"48878354","full_name":"katzer/cordova-plugin-app-event","owner":"katzer","description":"Cordova App-Event Plugin","archived":false,"fork":false,"pushed_at":"2019-09-25T11:13:44.000Z","size":23,"stargazers_count":26,"open_issues_count":4,"forks_count":23,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-21T17:04:33.436Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/katzer.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}},"created_at":"2016-01-01T13:09:23.000Z","updated_at":"2024-04-19T10:55:56.000Z","dependencies_parsed_at":"2022-09-08T20:52:18.160Z","dependency_job_id":null,"html_url":"https://github.com/katzer/cordova-plugin-app-event","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fcordova-plugin-app-event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fcordova-plugin-app-event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fcordova-plugin-app-event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/katzer%2Fcordova-plugin-app-event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/katzer","download_url":"https://codeload.github.com/katzer/cordova-plugin-app-event/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236018640,"owners_count":19082129,"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":"2025-01-28T12:37:50.596Z","updated_at":"2025-10-11T01:31:30.257Z","avatar_url":"https://github.com/katzer.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/cordova-plugin-app-event.svg)](http://badge.fury.io/js/cordova-plugin-app-event)\n\nCordova App-Event Plugin\n========================\n\nThe essential purpose of that plugin is to broadcast iOS-specific application events, so that 3rd party plugins can listen to them.\n\nIts mainly used as an internal dependency for the [LocalNotification][local_notification_plugin] and [Badge][badge_plugin] plugin. But can be used by any other plugin also. Feel free to submit an PR to broadcast additional events.\n\nAs of right now its possible to add observers for these events:\n- [didFinishLaunchingWithOptions][didFinishLaunchingWithOptions]\n- [didRegisterUserNotificationSettings][didRegisterUserNotificationSettings]\n- [didReceiveLocalNotification][didReceiveLocalNotification]\n\n\n## Usage\n\n#### 1. Add and install the plugin as an dependency\nOnce you have added the plugin as an dependency you can add observers for them.\n\n```xml\n\u003c!-- plugin.xml --\u003e\n\n\u003cdependency id=\"cordova-plugin-app-event\" /\u003e\n```\n\n#### 2. Add the protocol to the plugin's interface\nAs first the plugin needs to indicate interest to receivce app events by adding the `APPAppEventDelegate` protocol.\n\n__Note:__ Required for version 1.2.0 or newer!\n\n```obj-c\n// MyCordovaPlugin.h\n\n#import \"APPAppEventDelegate.h\"\n#import \u003cCordova/CDVPlugin.h\u003e\n\n@interface APPLocalNotification : CDVPlugin \u003cAPPAppEventDelegate\u003e\n\n@implementation MyCordovaPlugin\n\n...\n\n@end\n```\n\n#### 3. Add implementations for the delegated events\nTo add an observer you need to implement the [UIApplicationDelegate Protocol][app_delegate_protocol]. Implementations from your _AppDelegate_ class don't get overwritten!\n\nFor the `didReceiveLocalNotification` event you would need to add that method.\n\n```obj-c\n// MyCordovaPlugin.m\n\n@implementation MyCordovaPlugin\n\n- (void) didReceiveLocalNotification:(NSNotification*)localNotification\n{\n    ...\n}\n\n@end\n```\n\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n\n## License\n\nThis software is released under the [Apache 2.0 License][apache2_license].\n\n© 2013-2017 appPlant GmbH, Inc. All rights reserved\n\n\n[local_notification_plugin]: https://github.com/katzer/cordova-plugin-local-notifications\n[badge_plugin]: https://github.com/katzer/cordova-plugin-badge\n[didFinishLaunchingWithOptions]: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html?hl=ar#//apple_ref/occ/intfm/UIApplicationDelegate/application:didFinishLaunchingWithOptions:\n[didRegisterUserNotificationSettings]: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html?hl=ar#//apple_ref/occ/intfm/UIApplicationDelegate/application:didRegisterUserNotificationSettings:\n[didReceiveLocalNotification]: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/index.html?hl=ar#//apple_ref/occ/intfm/UIApplicationDelegate/application:didReceiveLocalNotification:\n[app_delegate_protocol]: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/\n[apache2_license]: http://opensource.org/licenses/Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fcordova-plugin-app-event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkatzer%2Fcordova-plugin-app-event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkatzer%2Fcordova-plugin-app-event/lists"}