Skip to content

Releases: strvcom/ios-dependency-injection

Improved debugging messages

24 Apr 09:52
bff058a

Choose a tag to compare

[2.0.1]

Added

  • Readable error messagesResolutionError messages now display human-readable Swift type names instead of raw ObjectIdentifier debug 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 ConcreteType and resolving with any Protocol (or vice versa) creates distinct registrations.

2.0.0

06 Mar 13:52
e70e77a

Choose a tag to compare

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