Code Monkey home page Code Monkey logo

Comments (6)

johnno1962 avatar johnno1962 commented on June 12, 2024

Please read the notes in the InjectionIII project about how you need to alter your code (@objc fun injected() methods or injectionObserver for SwiftUI) if you expect to be able to see your views redraw automatically on injection. The code you have injected needs to be re-executed for you to see the view change on the screen. If you've found the Inject project works you should use that.

from hotreloading.

crash481 avatar crash481 commented on June 12, 2024

Thank you for quick answer!
So InjectionIII is for Code Injection to working binary and it calls injected() methods, and I need to reload injected classes

But for what is HotReloading repository/project is done?
Because I cannot run, but when reading code it is something like "Inject" project, no?

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

The HotReloading project is basically all the code for the InjectionIII app and it's bundles as a Swift package which is used as a sub-repo when you build the app itself. It's normally used when you want to inject on an actual device rather than the simulator as you can't load one of the pre-built bundles inside the InjectionIII app on your Mac file system on a device. It can also be used in the simulator instead of the injectionIII app but that's another story. Once you've found a configuration that works and you feel you understand stick to that. There are many (perhaps too many) variations to using Injection.

from hotreloading.

crash481 avatar crash481 commented on June 12, 2024

Oh, understood. So Hot reloading also needs to implement Injection callbacks.
Do you have own solution to have hot reloading without minimum code changes for UIKit projects? Or Inject lib is the best for it?

I just want to write code like a Flutter hot reloading, but with UI Kit. And that my team also used it for faster UI development
Can you advice the best Hot Reloading guide in my case?

And also one more question:
What is Standalone Injection and is it better for my case?

from hotreloading.

johnno1962 avatar johnno1962 commented on June 12, 2024

HotReloading is the same code so yes it needs some code modifications like the InjectionIII bundles. There are two separate problems: First, you need to inject the new code into your app and Injection looks after that. The second is that the new code needs to be called again so you see the changes take effect on the screen. It would be nice if that were automated and Inject package is a step further down that road so perhaps that is the best fit for you. Standalone injection is using the HotReloading package or the bundles but without the app running which also works.

from hotreloading.

crash481 avatar crash481 commented on June 12, 2024

Oh, thanks a lot, so I will go with Inject project and will try to use it in my next development cycle!
Thank you very much for such great technology!

It will be great if there no any code changes needs for UI reloading like in Flutter apps, but maybe it is not possible to make less changes that in Inject project

from hotreloading.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.