생계유지형 개발자/Mobile

[ios] Exception: Could not instantiate class named WKWebView because no class named WKWebView was found

이 가을 2020. 7. 29. 13:01

 

# 오류

Thread 1: Exception: "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)"

 

# 원인

ViewController에서 WKWebView로 웹뷰띄우는 소스를 구현했을 때 WebKit framework 라이브러리를 프로젝트에 추가해주어야 한다.

@IBOutlet var webView: WKWebView!

 

# 해결