is there a way to view a website that’s hosted on my computer on my iPhone, if iPhone is connected to the computer via UBS in standard fashion? posted question here
days ago but have not received a response…
i.e., can I point – in browser in iPhone – to a url on my comptuer?
To do that, you’d probably have to set up your computer like a web server—so that you can connect to it remotely. (It’s a common thing to do, but still a bit of a dark art, imho!—having neverunderstood how to do it.)
Other options would be:
- upload your code to some test location online
- use the iOS simulator on your Mac
If you can hook the two up with a cable you could serve the site with a localhost for testing it, no?
I don’t quite understand your question… I do have localhost on my computer (Tomcat)
on my computer url to the site is “localhost:8080/photos…” so is it possible to point to this url from iPhone? (referencing my computer name before “localhost” or something like that?)
mainly remain just curious about this… simulator will also work, of course…
As long as the server is up and running, and the two are “networked” together. Hopefully you have it set up so you don’t need the port number, but there is a chance you do, the addresss would be something like
http://localhost [ : port if needed ]/[ site folder ]
http://localhost [ : port if needed ]/index.[ ext ]
no, they are not “networked” together… (connecting iPhone to computer with USB is not “networking”, right?
how would I “network” them together?
so I figured out how to “network” here,
but: does this “networking” only work thru an internet connection?
on iPhone, how do I connect to my wifi and my computer?
PS: and on airport in laptop, if I network, internet connection goes away… I don’t get this… if iPhone is connected to computer thru USB cable, shouldn’t I be able to “network” w/o an internet connection?
A localhost server isn’t the same as a hosted server with an IP address, DNS etc that have propagated.
As long as they’re physically connected and the OSs don’t clash try aiming a browser at localhost when you’re certain the localhost is up and running.
You’ll find that many here use localhost for Designing and / or Developing.
I’m pretty sure this isn’t an easy thing to do. When I connect my iPhone to my computer, the iphone definitely cannot see any web server or access any sites I have hosted locally by simply connecting the phone to the macbook with the USB cable. I googled it and came up with several “solutions” but was unable to get any of them to work.
I can’t verify this will work but you may want to try “Reverse Tethering”. Basically, your phone will connect to Laptop as a Wifi router.
from the little knowledge i have of networking what you want to do is virtually impossible
all you can do is to upload your website to domain and u are done
the os are different
maybe u can try it using a windows 8 phone and a windows machine but still technically impossible as the phone doesnt have that capability
There is also the option of using vagrant share if you’re using [url=https://www.vagrantup.com/]vagrant. Super simple once you have a vagrant environment running. Vagrant share is pretty awesome all you have to do is update the vm’s host file each time and restart the server than you can access your local vm from anywhere with about an 8 hour duration until you need to setup the share session again. It is relatively simple to just access you’re local but everything becomes much more complex with vhosts and vagrant share makes it super simple. Simply put you should be using vagrant if your not already and this feature just pushes it over the edge. Sitepoint has a lot of useful articles for vagrant.
Yes. I use the following set up.
1 ) I use a local server with MAMP.
2 ) I use Adobe Edge Inspect CC on my laptop and on my ipad, ipad mini, iphone and on Google Chrome. This allows me to see the local url on any a ) smart phone ( iphone, droid, etc ), b ) tablet, c ) ipad. Adobe Edge Inspect CC is free for ipad, iphone, droid, ipad mini. Here is a link that explains what Adobe Edge Inspect CC is.
3 ) I also have WebStorm configured to live preview on my local server.
Above set up is how I make sure that the websites that I design are mobile friendly.
Hope this helps you.