https://github.com/eugene-software/appbehaviordispatcher
Convenient dispatcher for UIApplicationDelegate and app lifecycle
https://github.com/eugene-software/appbehaviordispatcher
application ios lifecycle swift uiapplicationdelegate
Last synced: 3 months ago
JSON representation
Convenient dispatcher for UIApplicationDelegate and app lifecycle
- Host: GitHub
- URL: https://github.com/eugene-software/appbehaviordispatcher
- Owner: eugene-software
- License: mit
- Created: 2024-01-31T09:21:51.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-06-14T14:03:29.000Z (11 months ago)
- Last Synced: 2025-02-18T13:03:17.355Z (3 months ago)
- Topics: application, ios, lifecycle, swift, uiapplicationdelegate
- Language: Swift
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AppBehaviorDispatcher
[](https://cocoapods.org/pods/AppBehaviorDispatcher)
[](https://cocoapods.org/pods/AppBehaviorDispatcher)
[](https://cocoapods.org/pods/AppBehaviorDispatcher)## Requirements
- iOS 13 and above
## Usage Example
Import dependenices:
```swift
import AppBehaviorDispatcher
```Use in AppDelegate:
```swift
import UIKit
import AppBehaviorDispatcherclass AppDelegate: AppBehaviorDelegate {
var window: UIWindow?
override var behaviors: [ApplicationBehavior] {
return [
RootBehavior()
]
}
}
```Use in some Behavior file:
```swift
import UIKit
import AppBehaviorDispatcherfinal class RootBehavior: NSObject, ApplicationBehavior {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Run some code here
return true
}
}
```## Installation
### Swift Package Manager
1. Right click in the Project Navigator
2. Select "Add Packages..."
3. Search for ```https://github.com/eugene-software/AppBehaviorDispatcher.git```## Author
Eugene Software
## License
AppBehaviorDispatcher is available under the MIT license. See the LICENSE file for more info.