WKWebView not in Xcode

kaneyip picture kaneyip · Sep 23, 2015 · Viewed 34.4k times · Source

I need to implement the WKWebview for my ios app with Xcode. However i have error when using it "undeclared type 'WKWebview'". Do i missing anything important.

I'm using the latest Xcode7 download from App Store.

Answer

Johnykutty picture Johnykutty · Sep 23, 2015

If you are using swift, first import the WebKit module in any files you're using web kit API:

import WebKit

Then you can use the web view:

let webView = WKWebView()