每年Xcode升级都有可能遇到一些无法编译或者是崩溃的问题,在这里小小的记录下。
1、Xcode15新建工程,pod第三方库,部分库编译会报这个错误:
Sandbox:rsync.sanba deny(1) file-write-create xxx
解决办法:Build Settings 搜索 sandbox,把 Build Options 中的 User Script Sandboxing改为 NO
2、UIGraphicsBeginImageContextWithOptions崩溃
YYText使用时会崩溃在UIGraphicsBeginImageContextWithOptions
解决办法:UIGraphicsBeginImageContext Deprecated
3、cfstring constant not pointer aligned 或者 dyld: Symbol not found: xxxx
解决办法:Build Settings -> Other Linker Flags 加入-ld64
4、导入podAlipaySDK-iOS
编译抛出异常
报错:Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits")
可在Build Settings 中的Other Linker Flags 种添加"-ld64",即可解决。