-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support hot reloading with Inject #1710
Conversation
shoot this is on the wrong branch. I will have to fix it later. |
0c57bd1
to
0dd8f24
Compare
@@ -53,6 +53,10 @@ For now `main` is the main branch and code improvements are made in topic branch | |||
|
|||
A maintainer will review your code and merge it when it has the required number of approvals. | |||
|
|||
## Hot Reloading | |||
|
|||
We make use of the [Inject](https://github.com/krzysztofzablocki/Inject) framework for hot reloading debug builds. To set up hot reloading, follow the [documentation](https://github.com/krzysztofzablocki/Inject?tab=readme-ov-file#individual-developer-setup-once-per-machine). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this documentation is too light, but I am kinda rushing to throw this PR out there. Maybe the reviewer can tell me if it's enough or document the steps they had to take.
For instance, the first thing their documentation says to do is add some linker flags which is already done. So at least that part is superfluous. It's been a while since I set this up so I don't remember what I did exactly.
👀 |
I need to download Xcode from the App Store to continue testing this. I currently have the one from the "Xcodes app". I will pause testing this to download Xcode from the App Store over the weekend. I can do that now if it is very much important. But I will need to delete my current Xcode tho download that because of space issues and that can delay me doing other things. |
I continued to test this today, I didn't need to do anything extra-ordinary in the documentation linked. I only had to install inject and then run the project from Xcode. I searched the logs and found what Matt asked us to search, only issue I was getting was: I did some googling and saw that people were experiencing it too and it was due to permission issues. I tried to give Injection permission to read my files, but that was impossible. I saw online that it would work if I moved the nos folder directly to desktop. I tried to move the folder but I was getting some errors. I will have to reclone again to see if that would work. |
It worked after I moved the |
This works for me. Thanks for working on this @mplorentz |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💉
I actually fixed this by creating a symbolic link from But you can also install the App Store version of Xcode alongside the one from Xcodes.app. And you can have multiple versions from Xcodes.app isntalled at the same time too. They all work side by side, I just try not to have them launched at the same time. |
Description
This adds a framework for hot reloading to Nos. I tried it out in my hackathon project and thought it might be useful as a faster, more reliable alternative to SwiftUI previews.
How to test
CONTRIBUTING.md
.If not, maybe you need to watch the correct directory from the InjectionIII menubar app.
Screenshots/Video
(ignore the fact that in the video the simulator is showing my hackathon branch)
Screen.Recording.2024-12-27.at.10.00.28.AM.mov