lpbr Posted April 17, 2018 Share Posted April 17, 2018 Hello my friends! I am working on a simple game for kids that consists on a screen with objects that will produce sounds when they click or tap it. OK, I already made all needed adjustments to make it work well either on desktop computer browser as well on Android mobiles. For testing it on Android I used the debug mode of Chrome keeping an Android mobile hooked to the computer through an USB cable, then I could run it directly from my localhost (PC with Windows 7) that is very convenient: just change the code, save it and refresh the page. To make it happen I had to activate the 'developer mode' on my Android mobiles. Now it's time to tweak it to make it work on iOS platform also. I have two iOS gadgets (an iPhone 4 and an iPad 2) but I do NOT have a Mac. Now, how could I hook the iOS mobiles to my PC in a similar way I did to Androids in order to make my tests? I am afraid that there is NOT a way of doing this and that I will have to test my code with the exhaustive task of upload files to a live host and then load it back to the iPhone/iPad through Internet — that is very boring and time consuming. Please any input will be very welcome! Link to comment Share on other sites More sharing options...
Mickety Posted April 17, 2018 Share Posted April 17, 2018 You can always run a local web-server on your WiFi network. Any computer will do, I have a Raspberry Pi for all my webdev mobile testing needs. My ISP even provides internet access to my webserver over IP so I can access it for testing from far away. Alternatively (although somewhat illegal I guess) you can look into a thing called "Hackintosh" where you emulate MacOS for debugging purpose. It's a drag, sure, but I don't see any other way. Apple is not exactly known for, well, "friendliness" in that regard. lpbr 1 Link to comment Share on other sites More sharing options...
lpbr Posted April 17, 2018 Author Share Posted April 17, 2018 Thank you for answering Mickety! I am a bit confused on how to share my localhost on my wi-fi network. I work in home and here we have a router that broadcast Internet signal around through wi-fi. I use a desktop PC as my development computer and it has a wi-fi adapter hooked on one of the USBs. As you may suppose the localhost is running on THIS computer. How could I broadcast it making it visible to the other equipments? Thanks! Mickety 1 Link to comment Share on other sites More sharing options...
Mickety Posted April 17, 2018 Share Posted April 17, 2018 4 hours ago, lpbr said: Thank you for answering Mickety! I am a bit confused on how to share my localhost on my wi-fi network. I work in home and here we have a router that broadcast Internet signal around through wi-fi. I use a desktop PC as my development computer and it has a wi-fi adapter hooked on one of the USBs. As you may suppose the localhost is running on THIS computer. How could I broadcast it making it visible to the other equipments? Thanks! Well once a computer (or anything for that matter) connects to a WiFi network it gets it's own inner IP address. Usually your router IP is something like "192.168.1.1" (at least if you have a wire connecting router to PC directly). Any other device will have an IP like "192.168.1.31" or "192.168.1.45" My phone for example has a 192.168.1.38 IP address, so if I were to run a web-server on it I could connect to it via that IP address if my PC was connected to the same WiFi router. Basically all you need to do is: -Have two PCs (or similar devices) connected to the same WiFi network -Run a webserver (apache, nginx or many others) on one of them -Figure out the LOCAL IP (like "192.168.1.41) of the device that is running a webserver (you can do this by directly connecting to your wifi router. It usually has a list of devices with their names and addresses) -Put the local IP address in a browser tab and voila. If your ISP is generous enough and router can be easily configured you'd also be able to access it from outside the WiFi network. lpbr 1 Link to comment Share on other sites More sharing options...
lpbr Posted April 17, 2018 Author Share Posted April 17, 2018 YEAHHHHHHHHHHHHHHHHH! Mickety, thanks again for your generous contribution! It was very easy indeed. I tried to enter my router by I couldn't because the frakking cable guy that came to install and configure my ISP service supposedly changed the password. But then I used the 'ipconfig' Windows at the command prompt and I quickly retrieved my local IP that in this case is 192.168.0.103 (IPv4). Then I did as you said and typed in the very same IP either on my Android mobile and my iPhone and they just found my localhost instantly. Mickety 1 Link to comment Share on other sites More sharing options...
Mickety Posted April 18, 2018 Share Posted April 18, 2018 I am glad it helped. I'm also glad the message was sent, because right after I posted than response my internet went down lpbr 1 Link to comment Share on other sites More sharing options...
Recommended Posts