Comments (6)
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.
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.
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.
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.
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.
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)
- Problems using HotReloading as a Swift package HOT 4
- iOS device injection not working when running as a Mac app HOT 17
- Updates overlap in UI HOT 1
- class category injection failed on device HOT 7
- Some questions about the implementation. HOT 1
- Crasing in SwiftInjection HOT 25
- Is there anyway to re-compile a file only when cmd + s ? HOT 3
- cold start on device encounter watch dog HOT 13
- Does it support C functions 、variable in other files? HOT 7
- Will the DDHotKey affect the file watch ? HOT 6
- Cannot use HotReloading with Other debug configurations (ex. Dev, Test Configuration) HOT 12
- Xcode 15 beta link SwiftTrace failed HOT 8
- Hot reloading failing on real iOS device HOT 12
- Connection refused HOT 12
- Cannot reload on M1, getting an “eval101.dylib” can’t be opened because Apple cannot check it for malicious software error. HOT 21
- lopen() error: dlopen(/private/var/mobile/Containers/Data HOT 2
- Cannot reload on M1: Mac os Sonoma prevents InjectionIII from accessing data HOT 3
- Loading .dylib has failed, This is likely because Swift code being injected references a function using a default argument or a member with access control that is too restrictive or perhaps an XCTest that depends on code not normally linked into your application. Rebuilding and re-running your project (without a build clean) can resolve this. HOT 8
- Custom DerivedData folder breaks hot reloading HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotreloading.