-
Notifications
You must be signed in to change notification settings - Fork 100
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
'iosHost' config option to allow changing figwheel websocket host #26
Comments
Adding this to project.clj didn't help either:
|
I just made live reloading on a iOS device work by changing references to localhost to MYIP in AppDelegate.m, index.ios.js and env/ios/main.cljs. To make this easier I'd propose a |
I have no iOS device so will not be able to help much... so live coding does not work when you connect usb right? Or do you use wifi? For example, on android device localhost works fine when connected via usb, but to use simulator you need to use special IP. |
Or |
And I'm connecting through wifi, I don't think there's any way to do it over USB (even though it would be nice, but that doesn't seem to set up any kind of network interface). |
@drapanjanas My ios device connects through usb. |
@cldwalker - I'm pretty sure I edited the exact same files (AppDelegate.m, index.ios.js and env/ios/main.cljs) and I also set the :server-ip figwheel option to 0.0.0.0 to get figwheel to listen on all interfaces. I was able to connect and get the app to run (the connection to the react packager worked just fine) but there was no connection to the figwheel repl (started with A tcpdump on port 3449 showed no connection attempt from the figwheel client (running on my iphone) and looking at the compiled files I mentioned in my first comment, the settings didn't seem to have any effect, the websocket url was still pointing to localhost. |
@drapanjanas And yes live coding iOS device live coding doesn't work until I changed those three files |
@gnl I agree, we should be able to set an exact IP address. I will also implement the same for android afterwards. Feel free to design and submit the PR for use-ios-device command! @cldwalker yes, sounds great! |
Great, thank you! |
@gnl have you tried to restart packager after you have changed all these files? I sometimes experienced that my changes of index.ios.js was not active for some reason. |
@drapanjanas - yes, tried pretty much every possible combination of restarting the packager, including with the --reset-cache option and cleaning / rebuilding the cljs build, nothing. |
It's certainly possible that I might have missed something, so I'll just test again and help debug if there's any issues after @cldwalker submits his pull request. |
Just tried this again - editing/confirming the edits in AppDelegate.m, index.ios.js and env/dev/ios/main.cljs, resetting the packager cache and doing a clean build and I can confirm now that live code reloading works with an ios device. I can't think of anything I did differently before, but I guess I must have missed something. |
Works great, thank you! |
Currently there is no easy to set the figwheel websocket url to anything other than 'ws://localhost:3449' which would be very helpful for live code reloading on an iOS device.
I tried changing the :websocket-url in env/dev/env/ios/main.cljs, but the localhost URL still ends up in:
I'm not familiar enough with the code base/figwheel/compilation process and wasn't able to find a quick solution. Help! :)
P.S. Awesome project!
The text was updated successfully, but these errors were encountered: