代码之家  ›  专栏  ›  技术社区  ›  Aravind G S

Xcode的错误方法建议

  •  -2
  • Aravind G S  · 技术社区  · 8 年前

    我正在尝试在我的OS X应用程序中创建一个目录。当我开始打字时,我建议使用这种方法。但这种方法似乎被错误地建议了。NSFileManger中方法的attributes参数通常采用 [FileAttributeKey:Any] 字典,但这里的建议需要 [String:Any] 图书馆

    我检查了NSFileManager API,没有找到类似的API。有人能解释一下这里发生了什么吗?

    incorrect method suggestion

    1 回复  |  直到 8 年前
        1
  •  1
  •   matt    8 年前

    您的部署目标或Xcode版本旧。FileAttributeKey是新的。

    https://developer.apple.com/documentation/foundation/fileattributekey