Releases: strvcom/ios-dependency-injection
Releases · strvcom/ios-dependency-injection
Improved debugging messages
[2.0.1]
Added
- Readable error messages —
ResolutionErrormessages now display human-readable Swift type names instead of rawObjectIdentifierdebug descriptions, making it easier to diagnose missing or mismatched registrations.
Fixed
- Argument type matching clarified — Documented that argument matching is based on compile-time types, so registering with
ConcreteTypeand resolving withany Protocol(or vice versa) creates distinct registrations.
2.0.0
✨ New Features
- Multiple argument support — Dependencies can now be registered and resolved with up to three external arguments, eliminating the need for temporary wrapper structs. Built on Swift 5.9+ parameter packs (variadic generics).
- Parameter packs refactor — Replaced repetitive method overloads for 0–3 arguments with a single generic implementation using parameter packs, resulting in a cleaner and more maintainable API.
- Swift Testing framework — Test suite migrated to the new Swift Testing library, including tests for multi-argument resolution and concurrent shared instance behavior.
🐛 Bug Fixes
- Async shared instance deduplication — Fixed a race condition in AsyncContainer where multiple concurrent resolves of the same shared dependency each created their own instance. A task cache now ensures all concurrent
callers await the same resolution task and receive the same shared instance.
💥 Breaking Changes
- Resolution methods with arguments now use positional (unlabeled) arguments:
// Before
container.resolve(argument: myArg)
container.resolve(argument1: arg1, argument2: arg2)
// After
container.resolve(myArg)
container.resolve(arg1, arg2) - Default scope removed — The scope must now be explicitly specified when registering dependencies to avoid ambiguity in type inference.