1、 Could not build module ‘WebKit’
报错信息:
type argument 'nw_proxy_config_t' (aka 'struct nw_proxy_config *') is neither an Objective-C object nor a block type
解决方案:
编辑文件 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.0.sdk/System/Library/Frameworks/WebKit.framework/Headers/WKWebsiteDataStore.h
将里面的 170000 修改成 180000。
因为该文件是锁定状态,直接修改不了,需拷贝出来修改完成之后,再去替换该文件。
2、Assertion failed
报错信息:
Assertion failed: (false && “compact unwind compressed function offset doesn’t fit in 24 bits”), function operator(), file Layout.cpp,
解决方案:
Other Link Flags 添加 -ld64
路径:
Build Settings -> Linking - General -> Other Link Flags 添加 -ld64
3、UIGraphicsBeginImageContextWithOptions崩溃
报错信息:
YYText使用时会崩溃在UIGraphicsBeginImageContextWithOptions
解决方案:
可以在(void)_displayAsync:(BOOL)async这个函数里面添加
if (self.bounds.size.width<=0 || self.bounds.size.height<=0) {
self.contents = nil;
return;
}
感谢以下方案:
网友评论