I am working on the WebViews video and I cannot get the build to show correctly. I have checked and double-checked the code but once I build it succeeds but clicking the info button freezes the button and brings me back to Xcode to show an error. âThread 1: signal SIGABRTâ
Hello!
My webView does seem to load correctly, but on the console I get some error messages after a while. The app keeps working, though. Any ideas? Thanks in advance!
Xcode 10.0 beta 6
**2018-08-20 11:49:57.627876+0200 BullsEye[12959:1161577] Could not signal service com.apple.WebKit.WebContent: 113: Could not find specified service**
**2018-08-20 11:49:57.630839+0200 BullsEye[12959:1161577] Could not signal service com.apple.WebKit.Networking: 113: Could not find specified service**
@rwenderlich yep. I even tried copying the code directly into my XCode project and it still crashed when clicking on (or tapping on the phone) the info button to the âAboutâ page.
if i download from there and run your project it works fine but in comparing and even in copying directly from your project into mine I continue to get the same error. See screen shot for initial error. Pasting the additional code from AppDelegate below
2018-08-21 15:22:15.672627-0400 BullsEye[2154:995972] Unknown class _TtC8BullsEye35About_View_ControllerViewController in Interface Builder file.
2018-08-21 15:22:15.753796-0400 BullsEye[2154:995972] *** Terminating app due to uncaught exception âNSUnknownKeyExceptionâ, reason: â[<UIViewController 0x137a009f0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key webView.â
" Unknown class _TtC8BullsEye35About_View_ControllerViewController in Interface Builder file.
That makes me wonder if thereâs a mismatch between the class name for your view controller, and what you have configured in the Storyboard editor.
Iâd recommend selecting your about view controller in the storyboard editor, looking at what class name it is set to in the identity inspector, and make sure it matches to the name of the class inside your AboutViewController.swift file.
If youâre still having issues, feel free to zip up the entire project folder and send it to me so I can take a peek: ray@raywenderlich.com.
I encountered a similar error. I had missed the step where you hold down the control key and drag from the About View Controller yellow circle to the WebView. In other words, I had not connected the @IBOutletweakvar webView: WKWebView! to the AboutViewController.
Am really enjoying this course. However, I am also getting an error after having added the web view. It crashes with âThread 1: signal SIGABRTâ I downloaded the project files from this page and opened the project in xcode to build. I see the same error I do in my own project. In the console it says:
*** Terminating app due to uncaught exception âNSInvalidUnarchiveOperationExceptionâ, reason: âCould not instantiate class named WKWebView because no class named WKWebView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)â
I am using xcode 10.2 (10E125).
It is possible that I missed an instruction in an earlier video, but the solution for me was to go to the General Project settings and add webkit.framework to the linked frameworks and libraries at the bottom of the tab
Worked for me on Xcode Version 10.2 (10E125)
1.Go to general settings of your project.
2. Scroll down and find linked frameworks and libraries
3. Add webkit.framework
I had exactly the same error, and I solved it adding the webKit framework in the project options as somebody else explained.
*** Terminating app due to uncaught exception âNSInvalidUnarchiveOperationExceptionâ, reason: âCould not instantiate class named WKWebView because no class named WKWebView was found; the class needs to be defined in source code or linked in from a library (ensure the class is part of the correct target)â
The strange thing is: without any framework linked in the general options if I set a breakpointwhere the WKWebView is declared , pause and then I continue the normal execution the error disappears and the webView loads correctly. Maybe for some reason the app needs more time to load the WebKit library?
Thanks for your work on this project. This introduction to iOS coding has been well put together, which allowed me to get through without a problem until Part43, as discussed in this thread. The fix regarding adding webkit into Linked Frameworks resolved the problem.
Is there any chance you can update the video or add some commentary to include this extra step ? Iâd like to hear from you as to why this is required for Webkit and not UIkit and how it may be relevant in other cases.
In this application, with new update with Xcode, we just have to modify the code in order to work.
Two ways
ONE : ( as norcoder said below)
Worked for me on Xcode Version 10.2 (10E125)
1.Go to general settings of your project.
2. Scroll down and find linked frameworks and libraries
3. Add webkit.framework
SECOND Way: add this code just before override func viewDidLoad()
In this application, with new update with Xcode, we just have to modify the code in order to work.
Two ways
ONE : ( as norcoder said below)
Worked for me on Xcode Version 10.2 (10E125)
1.Go to general settings of your project.
2. Scroll down and find linked frameworks and libraries
3. Add webkit.framework
SECOND Way: add this code just before override func viewDidLoad()