升级Xcode15、iOS17遇到的问题总结

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;

}


感谢以下方案:

iOS 17 适配 Xcode 15 问题-CSDN博客

https://github.com/ibireme/YYText/issues/984

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容