Post

Replies

Boosts

Views

Activity

Reply to How to detect if Wifi is being used for CarPlay
We are grabbing the dict from State:/Network/Interface/<ifname>/AirPort and looking at the key WifiNetworkType if that makes sense. [quote='869060022, DTS Engineer, /thread/809596?answerId=869060022#869060022'] But inside your packet tunnel provider NECP should prevent you from accessing your VPN interface, and thus your data should run over WWAN. Is that not working in general? Or not working solely in the CarPlay case? [/quote] The issue is only when connected to CarPlay. The data comes into the PTP and since it's a Custom VPN application we essentially intercept the data to do our Custom VPN "magic" and then we send it out the WWAN afterwards. The issue is knowing what interface the WWAN is to send it out on and to not select the Wifi since it's an ACTIVE interface but being used for CarPlay. The other piece is that if Wifi and Cellular are both ACTIVE we give preference to Wifi. I don't know what more I can say but hope that makes sense. I'll also take a look at your post on networking
2d
Reply to How to detect if Wifi is being used for CarPlay
/Quinn, Glad you asked. The main reason for my question is because our App is a Custom VPN. When connected to CarPlay we can query the system and get the Primary network interface which is the Cellular interface. But, once our Custom VPN app is running the Primary is now the VPN TUN instead of the Cellular interface, which we need to pass data. The typically way we get around this is to then query for all the Active interfaces, giving preference to Wifi over Cellular. So now we are trying to use the Wifi interface for data when it's being used for CarPlay. I suspect the same issue would occur when the phone is being used as a hotspot but I have not tested that. In any case, I have found a "work around" that works. We now are looking at the WifiNetworkType and if it has a non-zero value do not use it.
3d
Reply to DNS not working when VPN is active on iOS/iPadOS 18.x
After inspecting the PTP (that I have unfortunately inherited due to a company workforce reduction) I believe I found the issue. It was returning from the startTunnel function before completely setting up the interfaces so we were telling the OS that the VPN was connected when it really wasn't. I suspect we have been getting lucky with all the releases up to now. Once I rewrote the code everything worked.
Dec ’24