iOS Question Status code in HttpResponse

Discussion in 'iOS Questions' started by Semen Matusovskiy, Aug 28, 2019.

  1. Semen Matusovskiy

    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.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    I don't see how you can connect to the internet in airplane mode unless you turned on the wifi.

    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.
     
  3. Semen Matusovskiy

    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. :)
     

    Attached Files:

    Last edited: Aug 28, 2019
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice