krzysztofzablocki / Inject

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

Adds custom injection bundle support #72

Closed nunogoncalves closed 1 year ago

nunogoncalves commented 1 year ago

This MR adds customization support for injection bundles.

Reading InjectionIII documentation, we read in Variations on using the InjectionIII app section:

Standalone Injection: Since 4.4.*+ this is now the recommended way of using injection as it contains fewer moving parts that need to be in place for injection to "just work". (...) download a binary release of the app to make available the "iOSInjection.bundle" but no longer need to run the app (though it still works as it did before if you do).

Thinking about this, and trying to find ways to decrease the number of things my colleagues need to do, me and @andredp came up with this solution.

This way, we can share the iOS bundle in our project repo, and that way nobody needs to do any additional work to setup Hot Reloading in their machine. For other platforms, this would also works, as long as we keep the bundle names according to list.

Hopefully this is a good adition to this project. Looking forward to hear from you! :)

johnno1962 commented 1 year ago

Hi Nuno, Thanks for the PR. I'll have to defer to @krzysztofzablocki on this one as it is his package. There are other alternatives though: Create a third package that has Inject and HotReloading as dependencies and your users would only have to add that. Another alternative to the HotReloading Swift Package would be migrating to the new InjectionLite re-write which brings in less "baggage" and should be equivalent.

nunogoncalves commented 1 year ago

Hi John. Thanks for your answer. :)

Create a third package that has Inject and HotReloading as dependencies and your users would only have to add that

This exactly what we're doing. :)

krzysztofzablocki commented 1 year ago

thanks