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

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

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

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


image.png

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


如果遇到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

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容