Closed hferrone closed 3 years ago
Attempting to use resolve() on an optional (or implicitly unwrapped optional) is a common reason for service resolution to fail, which is why it's mentioned at that point.
At first glance, it looks like you registered FirestoreRepository and SessionStore, but in the repository you're also injecting db: Firestore but I'm not seeing a registration for that. Everything you attempt to inject or resolve must be registered.
Doing a stack trace on the crash should show which injection is failing.
Hi!
I'm having a problem using Resolver in my iOS + Firebase project. When I run my app, I get the following error:
Fatal error: RESOLVER: 'FIRFirestore:' not resolved. To disambiguate optionals use resolver.optional().: file Resolver/Resolver.swift, line 222.
I've read your docs on optionals, and I don't have any in my project that relate to the services I've registered:
For reference, I've been following this wonderful tutorial by someone who works at Firebase: https://peterfriese.dev/replicating-reminder-swiftui-firebase-part2/
I'm not sure if I'm just misunderstanding the way injected variables work, or how DI files are resolved behind the scenes. Any help would be greatly appreciate!
Cheers,
Harrison Ferrone