Viewing locally hosted webpages on a closed wifi network (no internet) via ios 10 - ios

For the purposes of a presentation demoing our app, where internet is not available, I need to connect some iPhones and iPads to a local wireless network (an ad hoc network) from which they will access a local web-server (hosted on a macbook) to send / receive data.
In the past this was simple, but it seems iOS 10 is no longer happy connecting to wireless networks that don't allow it to access apple's own servers via the internet.
As a test, I am able to use MAMP Viewer to view my local sites when both my laptop and iPhone are connected to wifi with internet access, but not when both are connected to an ad hoc network created via the macbook. I can see that the host exists, but can't connect to it - MAMP Viewer reports an error (with no details).
Is there a workaround, or is it genuinely the case that iOS 10 devices can only use a wifi network for web data if there's an internet connection back to Apple? Hopefully I'm missing something obvious?

I was able to get the connection working using an encrypted wifi network offline running from a router, just not an ad hoc network or an unsecured network.

Related

Connect to own device's `lockdownd` from an iOS app

My question in a nutshell: Is there a way to create an iOS app running on an iOS device that can connect to and communicate with its own device's lockdownd?
(For the curious who want to know "the why": I would like to use the connection to lockdownd to trigger the installation of apps in .ipa files on the iOS device that have a "local provisioning profile", i.e. a provisioning profile with the flag LocalProvision set to true which means that over-the-air/OTA installations via a web-based installation are prevented by the operating system.)
A little background: You can connect to an iOS device's lockdownd from a second device either
by letting the second device serve as a USB host for the iOS device or
by establishing a wifi-based TCP connection to the iOS device on port 62078.
By using libraries like libimobiledevice, you can then interact with the iOS device - for example to trigger the installation of an app contained in an .ipa file.
What I have already researched & tried:
According to Jon Gabilondo's very good article Understanding usbmux and the iOS lockdown service, lockdownd creates a UNIX domain socket at /var/run/lockdown.sock - unfortunatley however with "privileges 511, which means only root will be able to write to it." (Quote from the article) --> I have therefore not tried accessing/writing to this socket.
lockdownd also opens a TCP endpoint listening on port 62078 in the device's wifi network. --> I have created a small test app that tries to establish a TCP connection to 127.0.0.1:62078. Unfortunatley, the connection attempt fails with the error #1 "Operation not permitted". Same when trying to connect to the IPv4 assigned by the wifi's DHCP server to the iOS device.
What other option could be used to establish a connection to an iOS device's lockdownd from within an app running on that device?

Charles Proxy not working on Mac with iPhone

I am trying the proxy the network traffic from my iPhone to Mac via Charles Proxy, below are the versions i am using:
iPhone - model 13, OS - 15.4
Mac - OS - Monterey (12.2.3)
Charles - 4.6.2 (licensed)
I installed Charles on Mac, enabled SSL Proxying, added generic IP (0.0.0.0/0) in Access Control Settings, got the local IP address from Help and used it on my iPhone wifi settings - Proxy > manual > local IP from Charles and port 8888.
As soon as i do this my phone is not able to connect to internet at all. I have seen various instructions about adding root certificate, enabling trust settings etc, but those all can be done only if am able to connect to internet to download the certificates. Which i am unable to.
I went through every question on this site which mentions Charles proxy, but none could provide any solution to my problem so appreciate any inputs on this.
If there is no important information in your phone, you can reset the network settings first, then try the following
Make sure that both the computer and the phone are not using a virtual private network
The computer and the phone are in the same network environment
The computer has the Charles root certificate installed
The phone has successfully installed Charles' certificate and trusts it.
If the above suggestions don't help you, I suggest starting from scratch and troubleshooting the problem step by step
Let's take mobile phones and computers accessing https://www.google.com separately as an example
After the computer installs the certificate, can it be connected to the Internet normally, and can it crawl Google's response request?
The mobile phone and the computer are on the same network segment and use the proxy URL provided by charles. Can you access and download the certificate?
3. On the computer, does Charles pop up an access prompt and ask you to choose whether to agree to the access?
Turn off the computer-side crawling and access it on the mobile phone to see if it can crawl the response request on the mobile phone.
Next time, check the firewall in the security and privacy settings. It should not block Charles' incoming connections. I spent two hours trying to figure out what was going on

Demonstrate intranet laptop site on iPad

We have an application which is intended for intranet use. It's not available on the web and we'd prefer to keep it that way.
In house the iPad can connect to the wifi and we can demonstrate the website that way. At a customers is there any way of connecting the iPad to the laptop and showing a website running on IIS off that laptop?
The only way I can think of is by attaching a router to the laptop and running a local network that way, not sure if customers would be entirely comfortable with that
We could also look into some kind of VPN arrangement? It would be so much easier if we could connect the iPad and laptop though
thanks
(Edit) Is Bluetooth a possibility?
I did a huge kludge when I needed something like that. I don't really recommend it because it's annoying, but it works to some level.
Connect your phone to the laptop, sharing the 3G connection via USB.
On the laptop, share that USB connection via WiFi.
Connect the iPad to the laptop's access point (WiFi)
The iPad should now be able to "see" the webserver that runs on your laptop

TCP connection not working properly when using iPhone as hotspot

I'm developing an application for iOS which is connecting through TCP sockets to a server aplication run on Android. In order to find the IP of the 2nd device I use a UDP request and receive the IP of the server.
It's working well all the time when I'm connecting them to Wi-Fi network or when I use the Android device as a hotspot to the iPhone. But if I want to make the iOS device a personal hotspot, I can't reach connection between the two devices and the app is useless in this regime. Is it possible to connect the devices then and is the algorithm the problem? I would be glad to hear if someone has ever had a similar problem and knows the solution.

how to get ios browser on iphone to view web pages on my local server for testing?

I have an iOS device. I'm developing some html 5 pages that I'd like to view on my iphone while developing. Is this possible. I tried accessing my local server's ip and it wouldn't connect. I'm not sure if there's something else I should try.
I also tried an my Android device evo shift 4g and same thing...it wouldn't connect using the ip.
Any ideas?
Is the local server running correctly configured apache, or some other server software? Can you access the local pages from a browser on the local server itself? Is the firewall letting port 80 connections in?
Are the WiFi devices in the same subnet as the server? What are the IP addresses of the phones? That could happen if you have a wireless router connected to a wired router, and the wireless router is running its own separate DHCP server. Have you tested from computers that are connected to the wireless network?
There shouldn't be anything that prevents an iPhone or an Android phone from connecting to an IP address that it can resolve. I've never had a problem connecting to a (public) IP address from either an iPhone or an Android phone.
I'm running IIS 7 on Windows 7 Professional. Had the same problem. It's a firewall issue. Go to Control Panel\All Control Panel Items\Windows Firewall\Allowed Programs and enable "World Wide Web Services (HTTP)" for "Home/Work (Private)". That worked for me. As my iPhone is in the same network, I now can access my test server by its IP.

Resources