30

Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_WKWebView", referenced from: ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

enter image description here

Any help is appreciated!

Johnny
  • 1,112
  • 1
  • 13
  • 21
  • 2
    Did you link the WebKit framework to your project? – Jonathan Jul 11 '16 at 02:36
  • Yeah, I'm sure I imported `#import `. But the minimum version of Xcode deploy is 7.0. – Johnny Jul 11 '16 at 02:39
  • 7
    I mean, did you: 1. Click on your project in Xcode 2. Select General 3. Locate "Linked Frameworks and Libraries" 4. Click the plus button at the bottom and select "WebKit.framework" 5. Click Add? – Jonathan Jul 11 '16 at 02:44
  • If you're minimum deployment target is iOS 7 you'll need to check which version of the OS the device is running. If the user is running iOS 7 you'll have to fall back to UIWebView. If they are using iOS 8 you can use WKWebView. This post will help you: http://stackoverflow.com/questions/25341238/xcode-6-ios-8-sdk-but-deploy-on-ios-7-uiwebkit-wkwebkit – Jonathan Jul 11 '16 at 02:48
  • @Jonathan You saved me . 1.I annotated these WKWebView code, that's running ok. – Johnny Jul 11 '16 at 02:53
  • @Jonathan 2. I added WebKit.framework to the `Linked Frameworkds and Libraries`, that's ok too. – Johnny Jul 11 '16 at 02:54
  • Finally I checked OS version of the project. Thank you ! @Jonathan – Johnny Jul 11 '16 at 02:54
  • No Problem. Glad I could help. – Jonathan Jul 11 '16 at 02:55

3 Answers3

42

Just for reference:

Go to your Project -> General -> Linked Frameworks and Libraries then add WebKit.framework

What you see here is that the WebKit framework is used but the actual binary is not getting linked.

david
  • 3,553
  • 4
  • 28
  • 39
1

Check if @implementation is absence. This answer gives you more info.

WINSergey
  • 1,977
  • 27
  • 39
0

Delete Derived Data -> Clean -> Build

Aftab Ahmed
  • 99
  • 1
  • 8