iOS Swift如何调试SIGABRT:“致命错误:调用已删除方法”从CocoaPod? [英] iOS Swift how to debug SIGABRT :"fatal error: call of deleted method" from a CocoaPod?

查看:402
本文介绍了iOS Swift如何调试SIGABRT:“致命错误:调用已删除方法”从CocoaPod?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用



更新:似乎该pod内的函数被严重破坏,在init中调用另一个函数会导致错误的访问异常:




解决方案

对于我来说,我创建了一个使用发行版构建配置的项目方案:





在此配置中,如果您的项目构建设置不允许在此发布模式下进行可测试性,则设置自定义断点或应用崩溃不会让您正确调试,会出现致命错误:调用已删除方法






解决方案:



检查项目构建设置的 可测试性





确保您要测试的构建配置为是。



就我而言,我暂时启用了可测试性发布设置为


I have an app which uses SlideMenuControllerSwift. I've modified some code to see how to present different panels, then rolled back my changes.

When running the project I get SIGABRT fatal error: call of deleted method in console when SlideMenuControllerSwift is initializing. No other error messages are given.

  • The project's source control appears to be in exactly the same state as before changes.
  • I did a "clean"
  • Reinstalled pods.
  • Deleted pods directory and made a clean install
  • Deleted app from device and ran again
  • Did a fresh checkout into a different folder
  • Updated cocoapods gem
  • Even modified the function to use self.addLeftGestures()

How do I debug an issue caused by cocoa pod throwing "fatal error: call of deleted method"?

UPDATE: seems like something is seriously broken with the functions inside that pod, calling another function within init causes bad access exception:

解决方案

In my case, I had created a project scheme that uses the release build configuration:

In this configuration, if your project build settings does not allow testability in this release mode then setting custom breakpoints or app crashes do not let you debug properly and you are served the fatal error: call of deleted method


Solution:

Check the project build settings for "testability".

Ensure it is "Yes" for the build configuration you are testing under.

In my case, I temporarily enabled testability for Release by making it Yes.

这篇关于iOS Swift如何调试SIGABRT:“致命错误:调用已删除方法”从CocoaPod?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆