Xcode 7 compile error : "Command failed due to signal: Segmentation fault: 11" Xcode 7 compile error : "Command failed due to signal: Segmentation fault: 11" swift swift

Xcode 7 compile error : "Command failed due to signal: Segmentation fault: 11"


Omg, this is a terrific bug of Xcode. Just read this. http://blog.bellebethcooper.com/xcode-bug.htmlIt made me smile.

The change was deceptively small, but here's what it was (inside my API client class, where I actually get the JSON data from the API):

I changed this:

`let json = try? NSJSONSerialization.JSONObjectWithData(data, options: [])`

to this:

`let json = try? NSJSONSerialization.JSONObjectWithData(data, options: []) as! [String: AnyObject]`

This is one of the most frustrating debugging experiences I've ever had, but I hope this post might help someone else who has the same issue. And if you ended up here via googling a bug you're struggling with and this didn't help you, I'm so sorry. I know exactly what you're going through. Don't give up!


This indicates that some Required method/func is missing from your code.In my case I was using ObjectMapper and in my class I was forgot to include required init() method which causes this "Command failed due to signal: Segmentation fault: 11"

required init?(_ map: Map) {}


Look at the other warning you see around.

My case pointed me to problem with iOS9 and GoogleAds. See here: https://developers.google.com/admob/ios/ios9

Short answer was to disable build setting ENABLE_BITCODE.

My error:

ld: '/pp/src/shared_js/libs/GoogleMobileAdsSdkiOS-7.3.1/GoogleMobileAds.framework/GoogleMobileAds(GADGestureIdUtil.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7clang: error: unable to execute command: Segmentation fault: 11clang: error: linker command failed due to signal (use -v to see invocation)