Search code examples
iosios-simulatorreachability

Is it possible to simulate 4G network in iPhone Simulator or device?


I wanted to know whether my device is connected to Wi-Fi or 3G or 4G specifically.Currently I am using Apple Reachability classes to check Internet Connection.
When I gave App for beta release to client it's showing connected network as Wi-Fi not 4G even though device is connected to 4G network.In my development location there is no 4G network to test.So is there any tool that can simulate 4G network?

Note:

  1. I tried with Xcode tool Network Link Conditioner, but by this I am able to simulate only speed of the network but not the type of the network.
  2. I tried with CoreTelephony framework also.But by using this I am getting incorrect results for iPad and iPhone.

iPhone 5:

  1. Connected to Wi-FI with SIM getting CTRadioAccessTechnologyHSDPA
  2. Connected to Wi-Fi without SIM getting NULL
  3. Connected to 3G getting CTRadioAccessTechnologyHSDPA

iPad:

Connected to WI-FI but I am getting NULL

API returning NULL value when there is no SIM in device.

So Is there any valid way to know whether the device(iPad and iPhone) is connected to Wi-FI or 3G or 4G.


Solution

  • I replaced existing classes with this and tested in actual 4G device, it's working as expected.