无法在Xcode 6.1中存档可正常运行的6.0.1 Swift项目/分段错误:11 [英] Can't archive working 6.0.1 Swift project in Xcode 6.1 / Segmentation fault: 11
问题描述
命令由于信号失败:分段错误:11 在[/Users/thedude/Documents/Repositories/MyProject/Data.swift:258:36-line:258:56]进行类型检查表达式时,RangeText ="UILocalNotification()"
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
以此类推...真正奇怪的部分是该项目可以在设备上编译并完全正常运行.这仅在为 ARCHIVE 构建时发生.我已将快速编译器优化级别设置为无,以查看是否这是无济于事的原因.
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.
推荐答案
虽然这不是解决方案,但我希望我能发现是否将 Swift Compiler Optimization Level 设置为 Fastest ,未选中[-Ounchecked] ,我至少可以存档并提交我的构建.
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.
我假设这是特定于Xcode 6.1(发行版)的问题,并且已经提交了错误报告.
I am assuming this is an Xcode 6.1 (release) specific issue and have filed a bug report.
这篇关于无法在Xcode 6.1中存档可正常运行的6.0.1 Swift项目/分段错误:11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!