Does app launch recency affect NEPacketTunnelProvider, HotspotHelper, or NEHotspotManager functionality?

We are assisting a client with their app integration. The client believes that NEPacketTunnelProvider, NEHotspotHelper, and NEHotspotManager extensions stop functioning if the containing app hasn't been launched by the user within some recent window (e.g. 30, 60, or 90 days).

We haven't been able to find any documentation supporting this claim. Specifically, we'd like to know:

  1. Is there any app launch recency requirement that would cause iOS to stop invoking a registered NEHotspotHelper or NEHotspotManager configuration?
  2. Is there any app launch recency requirement that would cause iOS to tear down or prevent activation of a NEPacketTunnelProvider?
  3. More generally, does iOS enforce any kind of "staleness" check on apps that provide Network Extension or Hotspot-related functionality, where not being foregrounded for some period causes the system to stop honoring their registrations?

If such a mechanism exists, we'd appreciate any pointers to documentation or technical notes describing the behavior and timeframes involved. If it doesn't exist, confirmation would help us guide our client's debugging in the right direction.

Thank you.

Thanks for the post. Very interesting question about that API!

What do you mean for staleness check? Once a Network Extension is installed, authorized by the user, and saved to the system preferences via its respective manager, the configuration is owned by the OS. The OS will continue to invoke the extension binaries as needed, regardless of whether the main app has been force-quit or hasn't been launched in months.

I’m interested on the behavior you are seeing is almost certainly caused by a secondary factors. Has the user has offload unused apps? I believe when an app is offloaded, its extension binaries are deleted along with the main app. The VPN profile or Hotspot configuration will still appear in iOS Settings, but the OS will silently fail to invoke the NEHotspotHelper or fail to connect the NEPacketTunnelProvider because the executable no longer exists.

You have mentioned 90 days? If this app is being distributed to internal testers or beta users via TestFlight, the app and its extensions will completely stop functioning exactly 90 days after the build was uploaded. The user must open the TestFlight app to download a new build.

Network Extensions operate in a heavily sandboxed environment and typically rely on shared credentials provided by the main app. If the VPN or Hotspot API requires an OAuth token, session cookie, or rotating certificate that expires after 30 or 60 days, the extension will fail to authenticate.

When iOS automatically updates an app in the background, the main app is not launched in case you are updating tokens only when the app launches.

I would recommend to add extensive logging to the extension to see if the OS is attempting to wake the extension, but the extension is crashing on launch or failing to authenticate due to expired credentials?

Albert Pascual
  Worldwide Developer Relations.

Does app launch recency affect NEPacketTunnelProvider, HotspotHelper, or NEHotspotManager functionality?
 
 
Q