【问题标题】:command failed due to signal: Segmentation fault: 11 when swift 3 migration由于信号,命令失败:分段错误:11 时 swift 3 迁移
【发布时间】:2017-02-17 04:55:57
【问题描述】:

我的示例代码是here 我的错在底线 感谢您的建议。

【问题讨论】:

    标签: swift xcode swift3 xcode8


    【解决方案1】:

    这个问题是动态的,每次编译器都会抱怨。

    我认为viewDidLoad 中的代码行会导致问题。不知道编译器为什么抱怨。

    但是,如果您注释这行代码,则错误将被删除。 删除此行尝试一次。

    如果可行,请尝试绕过此行。

    currencyFormatter.currencyCode = (Locale.current as NSLocale).displayName(forKey: NSLocale.Key.currencySymbol, value: NSLocale.Key.currencyCode)
    

    这里是segmentation fault thread,但是每个人都有自己的解决方案,这个错误没有通用的解决方案。

    祝你好运!!!

    【讨论】:

    • 感谢您的建议,我会尽快尝试:)我会告诉结果。
    • 效果很好 :)) 非常感谢。保重,祝我的朋友度过愉快的一天:)) @technerd
    • 你有解决方案吗?
    • 是的,我为货币格式化程序创建了新类,并在其中调用了函数。成功了,再次感谢你。 @technerd
    猜你喜欢
    • 1970-01-01
    • 2016-11-23
    • 2023-03-13
    • 2014-12-20
    • 2015-12-16
    • 1970-01-01
    • 2015-06-14
    • 1970-01-01
    • 2015-02-20
    相关资源
    最近更新 更多