AppBehaviorDispatcher 1.0.3

AppBehaviorDispatcher 1.0.3

Maintained by Eugene.



  • By
  • Eugene Software

AppBehaviorDispatcher

Requirements

  • iOS 13 and above

Usage Example

Import dependenices:

import AppBehaviorDispatcher

Use in AppDelegate:

import UIKit
import AppBehaviorDispatcher

class AppDelegate: AppBehaviorDelegate {
    
    var window: UIWindow?
    
    override var behaviors: [ApplicationBehavior] {
        
        return [
            RootBehavior()
        ]
    }
}

Use in some Behavior file:

import UIKit
import AppBehaviorDispatcher

final 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.