I have a customer with a device that connects to an ios device via its own internal hot spot. The problem is that there is a need to access the internet for forwarding data and this can only be done by a celluar connection. Most of the time the device will not have access to another external wifi network. I have seen some suggestions on setting the gateway address to 0.0.0.0 and that iOS will then use the celluar networ for other apps, but I need the app to be able to talk to both the wifi and celluar networks.
Any help or suggestions would be appreciated,
Jim
I should explain, that there is an ios app that is used to connect to the device. So it would be that app or a similar app connected via the devices hotspot that would need the concurrent connections.
The critical issue here is Wi-Fi auto join. Let me explain…
iOS fully supports multiple network interfaces but there are some non-obvious interactions that you have to be aware of. Specifically, when iOS tries to auto join a Wi-Fi network, it probes the network to see if its functioning. If it's not, it disassociates from the Wi-Fi, leaving the default interface set to WWAN.
This disassociation does not happen when the user manually joins the network.
So, you have two choices here:
If you configure your Wi-Fi network to satisfy the auto join probe, then iOS will switch the default route to Wi-Fi. WWAN stays up and is used by critical system services (like push notifications), but most apps will switch to using the (dysfunctional) Wi-Fi.
In this environment you can write code to run your network requests over WWAN but you'll have to use low-level APIs because our high-level APIs don't have a way to force a request to run over WWAN.
If you configure your Wi-Fi network to not satisfy the auto join probe, iOS will not auto join the network (well, it'll auto join then auto leave). The user will have to manually join the network. Once they do, the default route will stay on WWAN but your app will be able to talk to devices on the Wi-Fi because the Wi-Fi will be up and running; it's just not the default route.
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"