iOS调试真机出现的 “__llvm_profile_initialize“ 错误

一、错误形式:

app启动就崩溃,如下:

bash 复制代码
Demo`__llvm_profile_initialize:
    0x1045f7ab0 <+0>:   stp    x20, x19, [sp, #-0x20]!
    0x1045f7ab4 <+4>:   stp    x29, x30, [sp, #0x10]
    0x1045f7ab8 <+8>:   add    x29, sp, #0x10
    0x1045f7abc <+12>:  adrp   x8, 29
    0x1045f7ac0 <+16>:  ldr    x8, [x8, #0x28]
->  0x1045f7ac4 <+20>:  ldrb   w19, [x8]
    0x1045f7ac8 <+24>:  adrp   x0, 26
    0x1045f7acc <+28>:  add    x0, x0, #0x7ce            ; "LLVM_PROFILE_FILE"

二、解决方案

1、禁用代码覆盖率

Xcode15或者Xcode16创建的新项目,好像默认就开启了这个选项。项目设置 -> Build Settings,然后搜索 "Code Coverage",如下:

将上面的设置禁用或设置为"No"即可:

2、添加链接Flag: -ld_classic

如果上面的方法还不能解决,则做以下设置:

Targets -> Build Settings -> Linking General -> Other Linker Flags 添加:-ld_classic 或者-ld64

相关推荐
Data_Journal18 小时前
Golang 中解析 HTML 的指南
ios·iphone
jike_20261 天前
销售拜访记录APP推荐:客户沟通内容怎么快速整理?
ios·语音识别·iphone
00后程序员张1 天前
iOS 开发全流程需要哪些工具?编码、调试、构建、发布阶段选择
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
游戏开发爱好者81 天前
WebSocket 抓包怎么查看内容?从握手到消息帧完整解读
网络协议·计算机网络·网络安全·ios·adb·https·udp
悟空瞎说2 天前
# Alamofire 使用文档 完整翻译
ios
WeiAreYoung2 天前
Flutter+iOS 实现 Live Activity
flutter·ios
2501_916008892 天前
Swift多环境配置:利用Scheme实现灵活的多环境管理
开发语言·ide·vscode·ios·个人开发·swift·敏捷流程
00后程序员张2 天前
Windows / Linux / Mac 上不用 Xcode 把 IPA 上传到 App Store,upload 命令详解
android·ios·小程序·https·uni-app·iphone·webview
秦少游在淮海2 天前
id - Android、iOS
android·ios