货币代码返回nil

Jos*_*eph 0 swift swift3

如下所示,对货币代码的简单请求应返回货币代码,但返回nil.我是否需要在申请货币代码之前设置区域,或者是否有我遗漏的东西.我在我的模拟器上使用Swift 3.1和Xcode 8.3.3 iphone 6和相同的结果.

    if let currencyCode = Locale.current.currencyCode {
        print(currencyCode)
    }
Run Code Online (Sandbox Code Playgroud)

小智 8

请从编辑方案中选择系统语言,然后检查 图片