krzysztofzablocki / Inject

Hot Reloading for Swift applications!
MIT License
2.1k stars 114 forks source link

Add ViewControllerHost and ViewHost functions in InjectConfiguration in DEBUG mode (fixes #94, relates to #82) #97

Closed Frizlab closed 1 month ago

Frizlab commented 1 month ago

The API contract between DEBUG and non-DEBUG builds is still not strictly equivalent as the functions will return a wrapper in DEBUG mode and the original view in prod, and thus the return types of the functions are not the same in the two environments. That should not be an issue unless the client is trying to keep a reference to a view given by any of those two functions while specifying explicitly the type of the reference (e.g. let view: MyView = InjectConfiguration.ViewHost(myView)).

In practice I don’t think this will be an issue.

krzysztofzablocki commented 1 month ago

🙇