Reputation: 1762
I usually do a lot o development/testing on my local Mac / MAMP installation and then accessing it from my smartphone/tablet by just entering the proper IP address when the devices are on the same network.
However, I'm also often in a situation that I need to demo or test my web apps in places where there is no internet and my devices are not on the same network. What could I do then?
So again what I'd like to do is the following:
Again there is no "real" internet or other APs involved. It would be ideal if my Mac could also act as a DHCP server (so automatically assign IPs to devices connected via WiFi), but if thats too complex then I'll just enter the static IPs manually. BTW I don't need any fancy stuff like local domain names - just IPs are fine :)
Any ideas how one could accomplish something like this? If needed or it makes this workflow easier or quicker - I'm also not beyond buying other software to accomplish this.
BTW for example I had high hopes for this solution but it seems incomplete since my devices are still reporting that the network has no internet and are refusing to connect. Built in Mac connection sharing might also help somehow (not yet sure how?) but what connection to share if they're all offline?
Upvotes: 7
Views: 8543
Reputation: 1392
Forget Wi-Fi. Forget internet sharing and tethering. When testing a server app running on a Mac from an iPhone or iPad, just use the USB cable! You don't even need an internet connection.
I still can't believe it but... it just works!™
Upvotes: 1
Reputation: 161
Go network Utility, and find your ip adress it will change your connection for example if you connect internet via network cable it will show in Ethernet(en0) or wifi it will be in wifi(en1) . It is your localhost ip you can access from phone or genymotion
have a nice day
Upvotes: 0
Reputation: 46
Just tested this to access my Glassfish server via WiFi in a classroom setting and what I find is that the created network does show up on Macs and Windows, however, while on Macs you can access the machine serving the WiFi by my_machine_name.local, Windows machines can only see the machine by specifying the IP. It is however interesting to note that once you use a machine as WiFi spot, it has apparently no IP assigned anymore (use ifconfig in the Terminal to check that). Still, if you ping your own machine, i.e. ping my_machine_name.local, then it will show in IP that can be used by machines connecting to the WiFi spot machine.
Upvotes: 0
Reputation: 1762
I'll post my partial answer here - it will hopefully benefit somebody in the future.
In the end it was pretty easy:
Its unfortunately partial because it works only with Apple's Mac/iOS devices - other devices (have tried it with Android) will simply not see the personal network you've created (I assume details are being transmitted via Apple's Bonjour anyway so thats why). But better something than nothing.
But its still pretty cool - I can now connect my iPhone and iPad to the MAMP running on my Mac even without being connected to the Internet or having a DHCP-enabled AP taking care of the networking details.
Upvotes: 6