终端内的 Pod 安装错误

Pod install error within terminal

Pod File 此错误 [!] 无效 Podfile 文件:未定义方法 `Pod' for # Did you mean?荚。当我尝试 pod 安装时发生。在我的 pod 文件中,我刚刚添加了 'SwiftKeychainWrapper'

这是 cocoapods 的终端错误,也是我导入方式的错误

导入 SwiftKeychainWrapper

[!] 无效 Podfile 文件:# 的未定义方法“Pod” 你的意思?豆荚。

#
# ------------------------------------------ # pod 'Firebase/Database'

Pod 'SwiftKeychainWrapper' #
# -------------------------------------------

只需去掉大写 P,pod 必须写 p 而不是 P。 试试这个 pod 'SwiftKeychainWrapper'

ps.

如果仔细阅读错误

[!] Invalid Podfile file: undefined method `Pod' for # Did you mean? pod.

它说 Pod 不存在。你是说 pod