WKWebView not in Xcode
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.
Solution 1:
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()
Solution 2:
you need to import webkit in file
import WebKit
Solution 3:
You should import the header #import <WebKit/WebKit.h>
and add WebKit.framework
in Build Phases if you're using objective-c.
Solution 4:
Swift 5:
import WebKit
And add WebKit.framework
in Frameworks section under General project settings
Solution 5:
still dealing with Objective-C? 😤
#import <WebKit/WebKit.h>