iOS Swift how to debug SIGABRT :“fatal error: call of deleted method” from a CocoaPod?

為{幸葍}努か 提交于 2020-04-12 08:18:27

问题


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:


回答1:


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.



来源:https://stackoverflow.com/questions/45051325/ios-swift-how-to-debug-sigabrt-fatal-error-call-of-deleted-method-from-a-coc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!