1 Reply
      Latest reply: Nov 22, 2016 1:53 AM by eskimo RSS
      carlospr723 Level 1 Level 1 (0 points)

        I'm trying to include an online form in my application using a webview, and I notice that the once the user finishes the form, s/he can navigate to different addresses. Is there any way I can restrict the domain/url access of a webkit? (This used to be possible using UIWebView example: http://stackoverflow.com/questions/7673116/restrict-uiwebview-to-certain-pages but it's now depricated)

        • Re: WKWebView - Restricting domain
          eskimo Apple Staff Apple Staff (6,665 points)

          You should check out WKWebView’s navigation delegate (WKNavigationDelegate), set via the navigationDelegate property on the web view itself.  It has methods that lets you limit navigation, very similar to the UIWebView one you referenced.

          Share and Enjoy

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