目前專案的專案開發進度到一定的程度,開始使用不同的版本測試時
只要在iOS13以下且頁面有使用到 WkWebview 就會發生如下的錯誤,並且閃退
libc++abi.dylib: terminating with uncaught exception of type NSExceptionTerminating 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)'
在研究提示訊息後發現是缺少了WebKit.framework。
使用 iOS13+ 的設備 WKWebview 不會發生問題,但是iOS13以下的設備就會閃退
如下圖新增 framework 之後就正常了