4 Replies
      Latest reply on May 29, 2018 7:25 AM by johnjoseph
      Asieiev Level 1 Level 1 (0 points)

        Is it possible to flush DNS cache on iOS?

        I'm using NEDNSProxyProvider for redirecting traffic to our DNS server. But when I am changing our DNS server address to OpenDNS method handleNewFlow(_:)  doesn't called on previously visited sites.

        • Re: Flush DNS cache on iOS
          eskimo Apple Staff Apple Staff (9,685 points)

          Is it possible to flush DNS cache on iOS?

          There is no specific API to flush the DNS cache.

          I'm using NEDNSProxyProvider for redirecting traffic to our DNS server. But when I am changing our DNS server address to OpenDNS method handleNewFlow(_:)  doesn't called on previously visited sites.

          Can you walk me through this scenario in more detail?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: Flush DNS cache on iOS
              Asieiev Level 1 Level 1 (0 points)

              NEDNSProxyProvider started -> opened "example.com" in Safari -> called handleNewFlow(_:)

               

              handleNewFlow(_:) will not be called if I'll try to open web page again.

                • Re: Flush DNS cache on iOS
                  eskimo Apple Staff Apple Staff (9,685 points)

                  I’m sorry I wasn’t clear.  I’m looking for information as to why your setup requires you to flush the DNS cache.  How are entries getting cached such that they need to be invalidated?

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"

                    • Re: Flush DNS cache on iOS
                      johnjoseph Level 1 Level 1 (0 points)

                      I'm guessing @Asieiev's scneario is this:

                       

                      1. user visit example.com. this DNS entry is cached

                      2. user turns on the app which uses NEDNSProxyProvider, which specifies a custom DNS server

                      3. user visits example.com again. instead of using the custom DNS server to get a new value, the value cached from step 1 is used.

                       

                      He would like to programatically clear the DNS cache between steps 2 and 3.