Inject icon indicating copy to clipboard operation
Inject copied to clipboard

Module 'Inject' has no member named 'ViewControllerHost'

Open RodrigoIbarraSanchez opened this issue 10 months ago • 2 comments

I'm using this version: { "identity" : "inject", "kind" : "remoteSourceControl", "location" : "https://github.com/krzysztofzablocki/Inject.git", "state" : { "branch" : "main", "revision" : "838e614220000a563bbaeba2974236f2c2c51e13" } }

but having errors using Inject.ViewControllerHost() and .never

Errors: Module 'Inject' has no member named 'ViewControllerHost' Cannot infer contextual base in reference to member 'never'

Any thoughts on why this happens on newer versions?

RodrigoIbarraSanchez avatar Apr 23 '24 19:04 RodrigoIbarraSanchez

I'm not having issues using the previous revision e91205e809f7bd7f6fc3f26fc0b5c1fbfaac20c6.

RodrigoIbarraSanchez avatar Apr 23 '24 19:04 RodrigoIbarraSanchez

It was renamed for framework use, so just update your references

krzysztofzablocki avatar Apr 24 '24 07:04 krzysztofzablocki

I can confirm there's an issue with versions 1.5.0 and 1.4.0. I got the same error Module 'Inject' has no member named 'ViewControllerHost' when building a UIKit app with Release build configuration.

krris avatar May 24 '24 08:05 krris

It used to be under namespace, now it's just called ViewControllerHost or ViewHost

krzysztofzablocki avatar May 24 '24 09:05 krzysztofzablocki

e91205e809f7bd7f6fc3f26fc0b5c1fbfaac20c6

what do you mean by "update your references"? I still using e91205e809f7bd7f6fc3f26fc0b5c1fbfaac20c6 version to avoid the issue. Regards.

RodrigoIbarraSanchez avatar Sep 30 '24 04:09 RodrigoIbarraSanchez

just change the name in your codebase and use newest inject

krzysztofzablocki avatar Sep 30 '24 10:09 krzysztofzablocki