I am currently working on an iOS application that would ideally allow end users to create a VPN connection, find the server with Bonjour (NWBrowser) and then connect to it and then view media files using a media browser I built that runs locally on the server. I've already built a Mac OS X application that can perform the functionality in question, but iOS is a bit different. Is this possible?
Replies
I’m not sure I understand your requirements here. Let’s start with the VPN side of things. What sort of VPN connection do you want to create? One using the system’s built-in VPN transports (IKEv2, IPsec)? Or one using a custom VPN transport?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
I am using ZeroTier's sdk (https://www.zerotier.com) to create a VPN connection between client (iOS app) and server, but after that ZT connection is made, attempts to find the server with NWBrowser are fruitless. I've established both Bonjour Services + Privacy props in the info.plist. I can reach the server ip directly (via the Files app), but cannot discover the Bonjour services.
I am using ZeroTier's sdk
I’m not able to help with third-party tools or libraries. Do you know what Apple APIs this is based on?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
It looks like it's built using a NETunnelProviderManager.
It looks like it's built using a
NETunnelProviderManager.
I’m not sure what this means. iOS has two basic types of VPN:
-
Personal VPN
-
Enterprise VPN
Personal VPN uses built-in VPN transports, like IKEv2. An app can create a new Personal VPN configuration using NEVPNManager.
Enterprise VPN has either use the built-in VPN transports or a custom VPN transport. If it uses a built-in VPN transports then there’s no way to control the VPN configuration from a third-party app. If it uses a custom VPN transport then:
-
The transport is actually implement by an Network Extension provider app extension embedded in the container app.
-
The container app can use
NETunnelProviderManagerto configure and control the VPN.
So, if you’re using NETunnelProviderManager then I presume that you also have a NE provider appex. Is that right?
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"