You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-21Lines changed: 16 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
An ultralight Dependency Injection / Service Locator framework for Swift 5.2 on iOS.
4
4
5
+
**Note that several recent updates to Resolver may break earlier code that used [argument passing](./Documentation/Arguments.md#multiple) and/or [named services](./Documentation/Names.md). For more see the [Updates](#updates) section below.**
6
+
5
7
## Introduction
6
8
7
9
Dependency Injection frameworks support the [Inversion of Control](https://en.wikipedia.org/wiki/Inversion_of_control) design pattern. Technical definitions aside, dependency injection pretty much boils down to:
@@ -12,24 +14,6 @@ That's it. Dependency injection allows us to write code that's loosely coupled,
12
14
13
15
For more, see: [A Gentle Introduction to Dependency Injection.](./Documentation/Introduction.md)
14
16
15
-
## Resolver 1.3 Changes
16
-
17
-
Resolver 1.3 adds Name spaces to Resolver. Registering names allows for better autocompletion and makes your code safer by reducing potential runtime evaluation errors. This could be a breaking change based how you used named registristraions in your code.
18
-
19
-
```swift
20
-
register(name: .fred) { XYZServiceFred() as XYZServiceProtocol }
21
-
register(name: .barney) { XYZServiceBarney() as XYZServiceProtocol }
22
-
23
-
let service: XYZServiceProtocol =resolve(name: .fred)
24
-
```
25
-
For more see: [Named Instances](./Documentation/Names.md)
26
-
27
-
## Resolver 1.2 Changes
28
-
29
-
Note that Resolver 1.2 changed how arguments are passed to the registration factory order to provide better support for passing and handling both single and multiple arguments. This is, unfortunately, a breaking change from Resolver 1.1.X, but as the end result is much cleaner code I think it's worth it. If you're *not* using arguments then you should see no issues whatsoever.
30
-
31
-
See: [Passing and Handling Multiple Arguments](./Documentation/Arguments.md#multiple)
32
-
33
17
## Dependency Injection Strategies
34
18
35
19
There are six classic dependency injection strategies:
@@ -45,7 +29,7 @@ Resolver supports them all. Follow the links for a brief description, examples,
45
29
46
30
## Property Wrappers
47
31
48
-
Resolver now supports resolving services using the new property wrapper syntax in Swift 5.1.
32
+
Speaking of Annotations, Resolver now supports resolving services using the new property wrapper syntax in Swift 5.1.
Resolver itself is just a single source file (Resolver.swift), so it's also easy to simply download the file and add it to your project.
90
74
91
-
Note that the current version of Resolver (1.1) supports Swift 5.1 and that the minimum version of iOS currently supported with this release is iOS 11.
75
+
Note that the current version of Resolver (1.4) supports Swift 5.3 and that the minimum version of iOS currently supported with this release is iOS 11.
92
76
93
77
Read the [installation guide](./Documentation/Installation.md) for information on supporting earlier versions.
94
78
@@ -109,9 +93,20 @@ Further, Resolver:
109
93
110
94
Finally, with [Automatic Type Inference](./Documentation/Types.md) you also tend to write about 40-60% less dependency injection code using Resolver.
111
95
96
+
## Resolver Update Notes<aname=updates></a>
97
+
98
+
It's possible that recent updates to Resolver could cause breaking changes in your code base.
99
+
100
+
* Resolver 1.4 improved thread safety and performance. No breaking changes, though accessing Resolver's scopes directly is now deprecated. See: [Scopes](./Documentation/Scopes.md).
101
+
102
+
* Resolver 1.3 adds Name spaces to Resolver. Registering names allows for better autocompletion and makes your code safer by reducing potential runtime evaluation errors. This is a possible breaking change. See: [Named Instances](./Documentation/Names.md)
103
+
104
+
105
+
* Resolver 1.2 changed how arguments are passed to the registration factory in order to provide better support for passing and handling both single and multiple arguments. This is a breaking change. See: [Passing and Handling Multiple Arguments](./Documentation/Arguments.md#multiple)
106
+
112
107
## Author
113
108
114
-
Resolver was designed, implemented, and documented by [Michael Long](https://www.linkedin.com/in/hmlong/), a Senior Lead iOS engineer at [CRi Solutions](https://www.clientresourcesinc.com/solutions/). CRi is a leader in developing cutting edge iOS, Android, and mobile web applications and solutions for our corporate and financial clients.
109
+
Resolver was designed, implemented, documented, and maintained by [Michael Long](https://www.linkedin.com/in/hmlong/), a Senior Lead iOS engineer at [CRi Solutions](https://www.clientresourcesinc.com/solutions/). CRi is a leader in developing cutting edge iOS, Android, and mobile web applications and solutions for our corporate and financial clients.
0 commit comments