Search code examples
iosios8vpnnetworkextension

Backwards compatibility on iOS 8 with an app that uses NETunnelProviderManager


I have an app that is currently works fine on iOS 8, and we are adding support for a device-level VPN via NETunnelProviderManager. The app with the VPN extension works fine with iOS 9 and 10, but now no longer installs in iOS 8 with the following error:

[Error :appex bundle at /private/var/mobile/Library/Caches/com.apple.mobile.installd.staging/temp.tdt5DO/extracted/MYAPP.app/PlugIns/NetworkExtension.appex with id myapp.ID specifies a value (com.apple.networkextension.packet-tunnel) for the NSExtensionPointIdentifier key in the NSExtension dictionary in its Info.plist that does not correspond to a known extension point] 

I was planning on checking the iOS version at runtime and just not calling these APIs, but because of this failure the app doesn't even get to runtime.

Is there anyway I can get this to install and deal with it at runtime? It isn't really feasible for me to make a separate app just for iOS 8.

While my app uses the VPN extension, it can do some things w/o it so I want to keep iOS 8 support going forward, at least for a little while.


Solution

  • The solution was simply to choose the right iOS target for my plugin project, so it wouldn't get installed on OSes that don't support it.