Dependency initialization for an app, when dependency imported from a swift package. #181
cprince-foreflight
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
I think this is the answer. In the module that defines the dependency, you only conform it to Feature modules can depend on only the definition module, but the app entry point module depends on (or perhaps contains) the live implementation, so it will be used by the full app. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm having problems initializing a
@Dependency
for an app or target which consumes a Swift package which defines that@Dependency
. My specific case is that theliveValue
has no reasonable default, and that it needs to be overridden by the consuming package. I've looked at the overriding discussed here, but I want the override scoped for the entire application. I think that overriding doesn't do that.In the defining Swift package, I'm currently exposing the
liveValue
as apublic static var
, but that doesn't really seem good.Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions