File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # AppBehaviorDispatcher
2+
3+ ## Requirements
4+
5+ - iOS 14 and above
6+
7+ ## Usage Example
8+
9+ Import dependenices:
10+
11+ ``` swift
12+ import AppBehaviorDispatcher
13+ ```
14+
15+ Use in AppDelegate:
16+
17+ ``` swift
18+
19+ import UIKit
20+ import AppBehaviorDispatcher
21+
22+ class AppDelegate : AppBehaviorDelegate {
23+
24+ var window: UIWindow?
25+
26+ override var behaviors: [ApplicationBehavior] {
27+
28+ return [
29+ RootBehavior ()
30+ ]
31+ }
32+ }
33+ ```
34+
35+ Use in some Behavior file:
36+
37+ ``` swift
38+ import UIKit
39+ import AppBehaviorDispatcher
40+
41+ final class RootBehavior : NSObject , ApplicationBehavior {
42+
43+ func application (_ application : UIApplication, didFinishLaunchingWithOptions launchOptions : [UIApplication.LaunchOptionsKey : Any ]? = nil ) -> Bool {
44+ // Run some code here
45+ return true
46+ }
47+ }
48+ ```
49+
50+ ## Installation
51+
52+ ### Swift Package Manager
53+ 1 . Right click in the Project Navigator
54+ 2 . Select "Add Packages..."
55+ 3 . Search for ``` https://github.com/eugene-software/AppBehaviorDispatcher.git ```
56+
57+ ## Author
58+
59+ Eugene Software
60+
61+ ## License
62+
63+ AppBehaviorDispatcher is available under the MIT license. See the LICENSE file for more info.
You can’t perform that action at this time.
0 commit comments