iOS 9.3 VPN On Demand ignores RequiredDNSServers
We have an app which works well on iOS 9.2, it use the feature "RequiredDNSServers" of VPN On Demand. But when upgrade to 9.3 (9.3 all versions, including 9.3.2 beta 4), VPN On Demand just ignore "RequiredDNSServers".
"RequiredDNSServers" is an array of IP addresses used to resolving the specified domains. When DNS servers are not reachable, a VPN connection is established in response. On the other hand, the VPN connection should never start.
We submitted a bug to apple iOS SDK team and got response that "There is nothing Developer Technical Support can help, you should connect general VPN support which is supported by AppleCare". As I am using the same mobile configuration on iOS 9.2 and iOS 9.3 but get totally opposite result. So I think there must be something wrong with iOS 9.3. Could anyone help?
And I'm not the only person who encountered this problem. Another thread here: https://forums.developer.apple.com/thread/42624
Below is some code snippet of our mobile configuration.
Expected result:
When loading google.com, it should first check 8.8.8.8 for DNS result.
Actual result:
It will not request 8.8.8.8 for DNS result and will start VPN connection immediately.
- <key>OnDemandEnabled</key>
- <integer>1</integer>
- <key>OnDemandRules</key>
- <array>
- <dict>
- <key>Action</key>
- <string>EvaluateConnection</string>
- <key>InterfaceTypeMatch</key>
- <string>Wifi</string>
- <key>ActionParameters</key>
- <array>
- <dict>
- <key>Domains</key>
- <array>
- <string>www.google.com</string>
- </array>
- <key>RequiredDNSServers</key>
- <array>
- <string>8.8.8.8</string>
- </array>
- <key>DomainAction</key>
- <string>ConnectIfNeeded</string>
- </dict>
- </array>
- </dict>
- </array>
iPhone 6s Plus, iOS 9.3.1, 9.3 all versions have this problem