I spent a lot of time trying to solve that issue myself and already double checked available answers on SO with the same error. So here are the list of thing that I already excluded from possible reasons:
- No issue with frameworks as indicated here. I have created another project with the same frameworks set and all is fine
- No issue with SwiftyJSON, also works fine in test project
- No compile issues highlighted in the code
- I went through two different
project.pbxproj
files (from my original project and fresh test project) using comparison tool to find some differences in project settings, all the same - I also compared build command options for two projects and all the same
When I go to the Report Navigator and look for each file which wasn't compiled successfully, I found some weird correlation: any file that use some of the API of NSString
fails to compile. To prove that assumption I found some file which was compiled successfully and added there the following line of code
let abc = NSString(string: "abc")
and then this file stops to compile too.
So for some files it says that casting String
class object with as NSString
is invalid, somewhere NSAttributedString
/NSString
creation fails, in some other places calling compare
or rangeOfString
was incorrect etc. But when I copy pasted all that pieces of code that caused Segmentation fault
error to my new fresh project, they compiled successfully
And of course, that project was compiling fine using Xcode 6 just one day ago
I don't know where to go from here and how to fix that issues, any help will be very useful
UPD
I uploaded the project that doesn't compile to the GitHub