Swift Factory Di

MUST USE for questions about the Swift Factory dependency injection library by hmlongco, also called FactoryKit. Covers Factory 2.x APIs, best practices, testing, and migration. Trigger on setting up containers or registrations, scopes (.singleton, .cached, .shared, .graph, .unique), property wrappers (@Injected, @LazyInjected, @WeakLazyInjected, @DynamicInjected, @InjectedObject, @InjectedObservable), flaky tests from container state, circular dependency errors, SwiftUI previews, migration from Factory 1.x to 2.x, ContainerTrait, contexts (.onTest, .onPreview, .onSimulator), imports of FactoryKit/Factory, Container.shared, SharedContainer, @Injected keypaths like \.serviceName, or any Factory-specific API. Do not use for Swinject, swift-dependencies, Dagger, the factory design pattern, or generic DI concepts.

guillevc 8bc958a 4 files · 41.3 KB Updated

File contents

guillevc/skills/tree/main/skills/misc/swift-factory-di commit 8bc958ac21

Frequently asked questions

npx skillmds@latest add guillevc/swift-factory-di