Command failed due to signal: Segmentation fault: 11 Command failed due to signal: Segmentation fault: 11 ios ios

Command failed due to signal: Segmentation fault: 11


You can get this error when the compiler gets too confused about what's going on in your code. I noticed you have a number of what appear to be functions nested within functions. You might try commenting out some of that at a time to see if the error goes away. That way you can zero in on the problem area. You can't use breakpoints because it's a compile time error, not a run time error.


I recently encountered the same problem, and I will try to generalise how I solved it, as a lot of these answers are to spesific to be of help to everyone.

1. First look at the bottom of the error message to identify the file and function which causes the segmentation fault.

Error message

2. Then I look at that function and commented out all of it. I compiled and it now worked. Then I removed the comments from parts of the function at a time, until I hit the line that was responsible for the error. After this I was able to fix it, and it all works. :)


For anyone else coming across this... I found the issue was caused by importing a custom framework, I have no idea how to correct it. But simply removing the import and any code referencing items from the framework fixes the issue.

(╯°□°)╯︵ ┻━┻

Hope this can save someone a few hours chasing down which line is causing the issue.