Can iOS application use cellular internet connecti

2019-06-06 02:28发布

问题:

Is it possible to access internet (using cellular) during WiFi device configuration using Apple's "Wireless Accessory Configuration" feature?

This device would create the WiFi network and we would need to get data from the server while configurating the device.

Specifications:

  1. Would iOS automatically use cellular to connect to the internet if there is no internet connection through WiFi? (But still keeps WiFi connection with device)
  2. Or is it possible to programmatically switch between connections? For example: Get data from device through WiFi, send data to server through cellular, get data from server through cellular and then configurate device through WiFi.
  3. Some other way to accomplish this?

回答1:

From Apple Developers Forum:

eskimo: "iOS keeps WWAN active even when Wi-Fi is fully functioning. That’s done because important system services, like push notifications, always run over WWAN where possible.

So, what you’re asking about is the switch of the default route. In general, iOS only switches the default route to Wi-Fi when the Wi-Fi is fully up and running. That means that WWAN should remain the default route during the WAC process."

https://forums.developer.apple.com/thread/46528