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

相关推荐
杭城小刘9 小时前
Weex 底层原理与 APM
ios·前端框架·weex
2501_9240641110 小时前
2025年移动应用渗透测试流程方案及iOS安卓测试方法对比
android·ios
鼹鼠SDN1 天前
【保姆教程】iPhone、iPad上玩电脑游戏 异地串流
ios·iphone·ipad·moonlight·sunshine·串流·科技数码
初级代码游戏1 天前
iOS开发 SwiftUI 2 : Image
ios·swiftui·swift
TheNextByte11 天前
如何在不使用 iCloud 的情况下备份 iPhone 短信
ios·iphone·icloud
denggun123451 天前
内存优化-(二)-oc&swift
ios·性能优化·cocoa·内存·swift
我要用代码向我喜欢的女孩表白1 天前
对象存储路径文件1TB以上文件比对,go语言
ios·golang·xcode
2501_916007471 天前
iPhone APP 性能测试怎么做,除了Instruments还有什么工具?
android·ios·小程序·https·uni-app·iphone·webview
2501_915106321 天前
Windows 环境下有哪些可用的 iOS 上架工具, iOS 上架工具的使用方式
android·ios·小程序·https·uni-app·iphone·webview
Student_Zhang1 天前
一个管理项目中所有弹窗的弹窗管理器(PopupManager)
前端·ios·github