Skip to content

Commit 795b960

Browse files
Create README.md
1 parent 4d543a1 commit 795b960

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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.

0 commit comments

Comments
 (0)