美文网首页iOS-SDK开发
升级Xcode15、iOS17遇到的问题总结

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

作者: Mr_H889 | 来源:发表于2023-09-25 15:22 被阅读0次

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

相关文章

网友评论

    本文标题:升级Xcode15、iOS17遇到的问题总结

    本文链接:https://www.haomeiwen.com/subject/gjccbdtx.html