Search code examples
iosswiftxcode6.1

Can't archive working 6.0.1 Swift project in Xcode 6.1 / Segmentation fault: 11


Command failed due to signal: Segmentation fault: 11 While type-checking expression at [/Users/thedude/Documents/Repositories/MyProject/Data.swift:258:36 - line:258:56] RangeText="UILocalNotification()"

The error is referring to the following line of code.

var notification = UILocalNotification()
// also tried var notification:UILocalNotification = UILocalNotification()

The problem only occurs when archiving (to submit to store). If I comment out that line of code the error will just appear in other random locations until I eventually have a project that is pretty useless.

This is another example of what appears after commenting out the previous code mentioned.

var someDate:NSDate = self.datePicker.date

And so on... The REALLY strange part is this project compiles and builds totally fine on the device. This only happens when building for ARCHIVE. I have set the Swift Compiler Optimization Level to None to see if that was the cause to no avail.


Solution

  • Although it is not the solution I would hope for I did discover if I set the Swift Compiler Optimization Level to Fastest, Unchecked [-Ounchecked] I am able to at least archive and submit my build.

    I am assuming this is an Xcode 6.1 (release) specific issue and have filed a bug report.