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

相关推荐
游戏开发爱好者81 小时前
在 iOS 开发、测试与上架过程中 如何做证书管理
android·ios·小程序·https·uni-app·iphone·webview
ii_best1 小时前
按键精灵安卓/IOS手机助手 × 手机按键 App:1 分钟搞定设备连接(超详细教程)
android·ios·智能手机·自动化·编辑器
2501_916007472 小时前
在没有 Mac 的情况下完成 iOS 应用上架 App Store
android·macos·ios·小程序·uni-app·iphone·webview
TheNextByte12 小时前
iPhone存储空间已满?如何轻松释放iPhone空间?
android·ios·iphone
—Qeyser11 小时前
Flutter 颜色完全指南
android·flutter·ios
EniacCheng11 小时前
Windows11 Qt MSVC配置
qt·msvc·调试·winmain
2501_9160088912 小时前
iOS 上架需要哪些准备,账号、Bundle ID、证书、描述文件、安装测试及上传
android·ios·小程序·https·uni-app·iphone·webview
Zender Han19 小时前
Flutter Android 启动页 & App 图标替换(不使用任何插件的完整实践)
android·flutter·ios
—Qeyser1 天前
Flutter CustomScrollView 自定义滚动视图 - 完全指南
android·flutter·ios
—Qeyser1 天前
Flutter ListView 列表组件完全指南
android·flutter·ios