无法归档工作6.0.1 Xcode 6.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 时才会发生这种情况。我已将 Swift编译器优化级别设置为无,以查看是否无效。
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编译器优化级别到最快,未选中[-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.
这篇关于无法归档工作6.0.1 Xcode 6.1 /分段故障中的Swift项目:11的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!