iphoneiosnserrorcdma

CDMA cell data interruption on iPhone. NSError code?


I have a scenario where a NSURLConnection is in progress.

As we all know, CDMA phones (think Verizon, Sprint) can't handle data and phone calls at the same time. Does anyone know what, if any, NSError is returned when the connection is interrupted by a phone call?

Is there any error handling? Does didFailWithError get called or does it automatically go into the background?

Thank you in advance.


Solution

  • This is a good question. While I do not know the answer to this case specifically but if you implement this NSURLConnection function:

    - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
    

    And run your code on a device debugging with xcode, you should be able to see for yourself.

    edit:

    Adding to the other answer, I found the list of all URL errors, so hopefully you can narrow down which one you're looking for. errors

    pre-submission edit: I found it! The error is: NSURLErrorCallIsActive

    Returned when a connection is attempted while a phone call is active on a network that does not support simultaneous phone and data communication (EDGE or GPRS).