-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Visual Studio Code support? #49
Comments
Hi, I'm not sure I can support you on that journey but looking at your repo, you don't seem to have added the HotReloading repo to your Package.swift or loaded the iOSInjection.bundle? You would normally do the latter here: https://github.com/markst/hotreloading-vscode-ios/blob/dev/Demo/Injection/Injection.swift#L11 |
Ah the The As I mentioned - it is working fine when building & running in Xcode. @johnno1962 That's fine, I wondered if something might be screamingly obviously as to why it may not work using |
On second thoughts, there is very little prospect of VSCode support as InjectionIII needs to know where to find the build logs in order to work out how to recompile Swift source files. It might be possible to adapt it but the priority for now will be absorbing the changes that come with Xcode 14. |
Ah well in that case it seems that passing the Xcode DerivedData directory to
|
Top marks for creativity there! Are you saying Injecting works now? |
Wow! No changes to HotReloading required? I'll put a pointer to your repo in the README. It may be using the build logs from when you were using Xcode but still great work. |
I thought that, but have deleted my @johnno1962 unless the logs are located elsewhere? |
I'm a bit surprised to be honest HotReloading is finding them, but if it works it works ¯\(ツ)/¯. Let me know how you get on and if it's stable I'll ad a note to the HotReloading README. |
I've added a section to README which explains how to overcome the |
This is awesome work! I''ve added a section to the README of HotReloading with a pointer to your project already. I'm wondering if it is possible to use a fixed DerivedData path without the Xcode hash? HotReloading should still find your logs and this would mean people can clone your project and use it without having to modify it. |
In fact, it's already going to work isn't it? The Xcode hash you've entered is probably going to be used anyway. I feel a tweet coming on. |
Sort of related to johnno1962/InjectionIII#388 then? If using a DerivedData path without the hash, somewhere along the way the directory with the hash gets created: Far as I can tell, two reference to |
I think the hashed path will get created just by viewing the project in Xcode without building it. This aside does injection work if leave off the hash? Perhaps it doesn't make much difference in the end. |
Nope, fresh Injection only works when passing hashed path to I'm happy with this setup, no real pressure to support custom derived path. |
Interesting, but if people clone your project the hash will be different and it won't work for them which is a shame. I guess they could figure it out. |
I did make a start at building a swift package which could be used to generate the hash as part of the vscode environment. https://github.com/markst/xcode-project-hashes I guess ideally I'd create a vscode extension which would automate the process: markst/hotreloading-vscode-ios#4 |
Hey Mark, I'm happy you're still looking on this. I assume you found the XcodeHash implementation to work from. The other news is that I re-wrote The HotReloading Project to take out all the unnecessary code involved in working with the app that had accumulated over the years and is no longer required: https://github.com/johnno1962/InjectionLite. You may want to switch over to that? This code works out the correct build logs to work from by using the last modified one. |
Hi @markst, Don't you just need an |
It’s a part of `Inject` (or HotSwiftUI). Either way you need something in the view to observe the injection.
… On 15 Dec 2023, at 22:38, Mark Turner ***@***.***> wrote:
had a real quick go integrating InjectionLite using Xcode in my demo project, but need to dig deeper as to why it's not working for me:
2023-12-16.08-35-22.2023-12-16.08_37_40.gif (view on web) <https://github.com/johnno1962/HotReloading/assets/274318/df602bab-3d00-4ae5-a111-07921cd5ae36>
—
Reply to this email directly, view it on GitHub <#49 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AANUBMNYHRPDVPRARNTBAWLYJS7MPAVCNFSM5XQ2W5MKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCOBVHA2TCOJRGEZA>.
You are receiving this because you modified the open/close state.
|
thought I'd share this if it's of interest: https://github.com/markst/vscode-xcodegen-builder |
Sounds Handy! Did you get your view refresh problems sorted out in the finish? |
HI @markst, was wondering if you're waiting for xcodebuilds to build outside Xcode whether you'd be interested in https://github.com/johnno1962/xcodemake |
Hey @johnno1962, firstly thanks for all your work on HotReloading!
I stupidly made the issue on wrong repo here: jordansinger/SwiftUI-Kit#46
Cheers for responding.
I wonder if you might offer some help as to how I can get HotReloading to work when debugging using vscode.
I've created a demo repo here: https://github.com/markst/hotreloading-vscode-ios
Hot reloading works great when running the generated Xcode project from Xcode.
However when launching the project from vscode, hot reloading doesn't work.
The text was updated successfully, but these errors were encountered: