Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Understanding when the push provider calls stop() with the noNetworkAvailable reason

I have 3 phones

  • iPhone 14 iOS 18.3
  • iPhone Xr iOS 18.5
  • iPhone Xr iOS 18.4.1

My app has a network extension, and I've noticed each phone having their connectivity interupted by calls on the push provider, calling stop with the noNetworkAvailable reason. The point of confusion is that each phone seems to get it's interuption at different times. For example one will get an interuption at 1:00, while the others is fine, while at 3:00 another will get an interuption, while the others are fine.

This is confusing since a "no network available" seems to imply a problem with the router, or access point, but if that were the case, one would believe it should affect all the phones on the wifi. I don't see less interuptions on the iPhone14 vs the iPhone Xr. Do you believe the iOS version is affecting the performance?

Could you please give me some insight, as to what could be going on inside these phones?

P.S. I also see an error pop up when using NWConnection, this is inside the App. The state update handler will sometimes return the state, waiting(POSIX(.ENETDOWN)) Is there any relation to what's going on in the extension?

Answered by DTS Engineer in 844067022

My app has a network extension, and I've noticed each phone having their connectivity interupted by calls on the push provider, calling stop with the noNetworkAvailable reason. The point of confusion is that each phone seems to get it's interruption at different times. For example one will get an interuption at 1:00, while the others is fine, while at 3:00 another will get an interuption, while the others are fine.

What were the phones physically doing at the time the interruption occurred? The most common reason this occurs is simply that the device moved out of WiFi coverage. A few notes on that point:

  • Providing good WiFi coverage over a large area under real world conditions is sufficiently difficult that unless a large scale network has been well surveyed and professionally maintained, significant dead zones are all be guaranteed.

  • In my experience, users reports of their active ("I was in range so it should have worked") are completely unreliable.

  • Network configuration is more complicated and error prone than is commonly understood. Case in point:

This is confusing since a "no network available" seems to imply a problem with the router, or access point, but if that were the case, one would believe it should affect all the phones on the wifi.

That has not been my experience at all. Setting aside direct coverage issues, modern network hardware configuration is sufficiently arcane and complex that there is enormous opportunity for misconfiguration and other failures.

Do you believe the iOS version is affecting the performance?

Experience has taught me that this is the least likely factor. By design, the push provider implementation is fairly straightforward (it's basically just reacting to the WiFi radio) and generally performed very well since release.

P.S. I also see an error pop up when using NWConnection, this is inside the App. The state update handler will sometimes return the state, waiting(POSIX(.ENETDOWN)) Is there any relation to what's going on in the extension?

Well, yes. The app and the extension are both reacting to the same underlying issue, namely that the device is not connected to a functioning network.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

My app has a network extension, and I've noticed each phone having their connectivity interupted by calls on the push provider, calling stop with the noNetworkAvailable reason. The point of confusion is that each phone seems to get it's interruption at different times. For example one will get an interuption at 1:00, while the others is fine, while at 3:00 another will get an interuption, while the others are fine.

What were the phones physically doing at the time the interruption occurred? The most common reason this occurs is simply that the device moved out of WiFi coverage. A few notes on that point:

  • Providing good WiFi coverage over a large area under real world conditions is sufficiently difficult that unless a large scale network has been well surveyed and professionally maintained, significant dead zones are all be guaranteed.

  • In my experience, users reports of their active ("I was in range so it should have worked") are completely unreliable.

  • Network configuration is more complicated and error prone than is commonly understood. Case in point:

This is confusing since a "no network available" seems to imply a problem with the router, or access point, but if that were the case, one would believe it should affect all the phones on the wifi.

That has not been my experience at all. Setting aside direct coverage issues, modern network hardware configuration is sufficiently arcane and complex that there is enormous opportunity for misconfiguration and other failures.

Do you believe the iOS version is affecting the performance?

Experience has taught me that this is the least likely factor. By design, the push provider implementation is fairly straightforward (it's basically just reacting to the WiFi radio) and generally performed very well since release.

P.S. I also see an error pop up when using NWConnection, this is inside the App. The state update handler will sometimes return the state, waiting(POSIX(.ENETDOWN)) Is there any relation to what's going on in the extension?

Well, yes. The app and the extension are both reacting to the same underlying issue, namely that the device is not connected to a functioning network.

__
Kevin Elliott
DTS Engineer, CoreOS/Hardware

Understanding when the push provider calls stop() with the noNetworkAvailable reason
 
 
Q