ios cannot use "@throw" with objective-c exceptions disabled 问题解决方案

复制代码
本人亲测有效!更多交流可以家魏鑫:lixiaowu1129,公重好:iOS过审汇总,一起探讨iOS技术!

我的项目是unity3d导出的xcode项目,在使用Masnory框架时,编译运行报出如下错误:

ios cannot use "@throw" with objective-c exceptions disabled 查了资料,解决方案如下:

修改后编译运行木有问题了。


如果遇到u3d项目与object-c项目交互的话,会遇到以下问题:

不支持@try 或@throw

标签:

Cannot use '@try' with Objective-C exceptions disabled 或

ios cannot use "@throw" with objective-c exceptions disabled

解决办法:修改target -> build settings -> All | Combined -> Apple LLVM Compiler 7.0 - Language 中 Enable Objective-C Exceptions 为YES

相关推荐
pop_xiaoli3 小时前
OC—UI学习-2
学习·ui·ios
90后的晨仔6 小时前
git 命令汇总
ios
liucan2339 小时前
JS执行速度似乎并不比Swift或者C语言慢
前端·ios
安和昂11 小时前
【iOS】 Block再学习
学习·ios·cocoa
pop_xiaoli11 小时前
OC学习—命名规范
学习·ios
tangbin58308513 小时前
iOS Objective-C 工具类:数据转换工具 ParseDataTool 解析
objective-c
Digitally15 小时前
如何在没有 iTunes 的情况下备份 iPhone
ios·iphone
HarderCoder15 小时前
ByAI:iOS 生命周期:AppDelegate 与 SceneDelegate 中的 `willEnterForeground` 方法解析
swift
大熊猫侯佩16 小时前
SwiftData 如何在 Widgets 和 App 的界面之间同步数据变化?
swiftui·swift·apple watch