iOS 使用 lldb 断点加载调试工具如 Reveal-Lookin-Woodpecker
整体的 lldb 加载命令如下, 放在 ~/.lldbinit 文件内 ### Reveal LLDB commands support - DO NOT MODIFY command
WKWebView
加载 本地PDF
CoreFoundation ___exceptionPreprocess + 124
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[NSException initWithCoder:]
3 QuartzCore 0x000000018cd9f000 + 1108684
4 QuartzCore 0x000000018cd9f000 + 1109064
5 QuartzCore 0x000000018cd9f000 + 1110424
6 UIKit -[UIView(Geometry) setFrame:] + 792
7 WebKit -[WKPDFView _computePageAndDocumentFrames] + 648
8 WebKit -[WKPDFView _didLoadPDFDocument] + 104
9 WebKit -[WKPDFView web_setContentProviderData:suggestedFilename:] + 164
10 WebKit -[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:] + 84
11 WebKit WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider(WTF::String const&, IPC::DataReference const&) + 100
In my case it was triggered by trying to display a UIWebView that had been created from an NSData object with invalid data, possibly from an empty file
测试: 加载本地0KB
的PDF
文件并不会导致CALayerInvalidGeometry
WKWebView
或者 UIWebview
初始化 一定要设置 frame
设置Xcode CG_NUMERICS_SHOW_BACKTRACE
环境变量 检测异常参数
键盘的问题??