iOS Question Status code in HttpResponse

Semen Matusovskiy

Well-Known Member
Licensed User
Hi, guys --

I test program's stress resistance and noticed some strange moments.
Smartphone : IPhone 6s Plus, IOS 12.4 without SIM (connected by Wi-Fi)

1) Airplane mode.

The plane appears, but internet remains. Why ?

2) If Wi-Fi is turned off, I expected to receive some information from httpResponse.
But, unlike Android, status code is 0 and error description is empy. Is it normal ?

To detect internet disconnect is simple (using IP). But I have no idea how to detect troubles, for example, with SSL.
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
The plane appears, but internet remains. Why ?
I don't see how you can connect to the internet in airplane mode unless you turned on the wifi.

But, unlike Android, status code is 0 and error description is empy. Is it normal ?
Yes. Status code will also be 0 or -1 in Android.

You should check if Job.Success is true or false. If it is false then you should check Job.ErrorMessage.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
Erel --

About ErrorMessage. I can't get it even for error 404. I attached my test program.

About airplane mode. I inserted SIM card and understood, how it works.
Airplane mode automatically turns off cellular internet and Wi-Fi also. It's neccessary to turn Wi-Fi on manually.

If SIM card is not present, airplane mode turns off nothing (!) and it's neccessary to turn Wi-Fi off manually. Strange logic. :)
 

Attachments

  • test.zip
    2.7 KB · Views: 276
Last edited:
Upvote 0
Top