Member-only story
Xcode 9 GM — WKWebView NSCoding support was broken in previous versions
Does anyone know how to fix this error with Xcode 9 GM? I’m working on an app made with Xcode 8.3, the deployment target is for iOS 9.3 and I never had this problem before. I don’t find any information here or on Apple forums yet :(
Edit: This error came when I put a WKWebView into interface builder, not if I use it programmatically.
WebKit was introduced in iOS 8 but it was released with an error which caused in a runtime crash, If you are using Xcode 9/10, your project configuration support less than iOS 11 and if you are trying to add WKWebView using interface builder. Xcode immediately shows a compile-time error.
WKWebView before iOS 11.0 (NSCoding Support was broken in the previous version)
Although WKWebView was introduced in iOS 8, there was a bug in –[WKWebView initWithCoder:] that was only fixed in iOS 11.
Resolution is you must add WKWebView through code (Only if you are supporting below iOS 11). That actually sounds strange.
Another solution is to change the Interface Builder Document Builds for the option to iOS 11 and…