如何删除Podfile.lock?

Hiy*_*iya 7 xcode cocoapods swift podfile-lock

Xcode 最近更新了,我的代码在 STPAPIClient.m 中给出了此错误:

Incompatible block pointer types sending '__strong STPAPIResponseBlock _Nonnull' (aka 'void (^__strong)(__strong ResponseType, NSHTTPURLResponse *__strong, NSError *__strong)') to parameter of type 'void (^)(STPSource *__strong, NSHTTPURLResponse *__strong, NSError *__strong)'
Run Code Online (Sandbox Code Playgroud)

编辑:我找到了 podfile.lock,但每次删除它并安装 pod 时,我都会检查项目目录,Podfile.lock 仍然存在。有谁知道如何删除它?谢谢!

Dhi*_*rma 6

如果您删除了一些软件包,但它仍然显示在 podfile.lock 中。

只需转到终端中的project/ios_directory 并一一运行以下命令即可。

=>pod update

=>pod install

  • “pod clean”对我不起作用。我运行了“pod update”,它为我生成了一个新的 podfile.lock,之后我就能够运行“pod install”。 (6认同)

Rob*_*ier 5

您永远不应该直接修改 Podfile.lock。它是由 生成的pod install。如果要删除 Pod,请编辑 Podfile,删除所需的 Pod,然后重新运行pod install