Okay, why are you needing to find the new DNS server when the network changes? If you are wanting to redirect DNS traffic, try setting NEDNSSettings on your NEPacketTunnelProvider to serve specific domains. If you need a device specific DNS handling, take a look at NEDNSSettingsManager Thank you matt.
Yes, I wanna redirect dns traffic by complex rules, for example some queries I resolve myself, others pass to the default DNS server. The rules are too complex to just describe in NEDNSSettings, like Regexp domain names, some TXT queries and so on.
Post
Replies
Boosts
Views
Activity
It finally works after syncing to the computer, I do not know why but the problem is solved. Hopefully the reply will be useful to someone who also meet this problem.
+1, downgrade Xcode and wait for fix