How do you delete Podfile.lock?
Asked Answered
P

2

7

Xcode recently updated and my code is giving this error in 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)'

Edit: I found podfile.lock, but every time I delete it and pod install, I check the project directory and Podfile.lock is still there. Does anyone know how to delete it? Thanks!

Phosphine answered 27/3, 2020 at 18:37 Comment(5)
Podfile.lock is an output of pod installTorrence
Okay. So now I'm trying to delete Stripe from my podfile.lock, but when I do pod install, it reinstalls Stripe. How can I remove Stripe?Phosphine
See guides.cocoapods.org/using/pod-install-vs-update.htmlFu
Remove Stripe from the PodfileTorrence
thanks Paul and Rob!Phosphine
D
5

You should never modify Podfile.lock directly. It's generated by pod install. If you want to remove a Pod, edit Podfile, delete the Pod you want, and rerun pod install.

Deflagrate answered 27/3, 2020 at 19:27 Comment(2)
If i deleted podfile.lock file, that makes an issue or it's normally?Refit
Generally you should not delete the podfile.lock, but if you do, I believe rerunning pod install should fix it.Deflagrate
F
7

If you have removed some packages and it is still showing in podfile.lock.

Just goto project/ios_directory in your terminal and run following command one by one.

=> pod update

=> pod install

Faires answered 14/4, 2021 at 4:53 Comment(1)
pod clean didn't work for me. I ran pod update instead and it generated me a new podfile.lock and I was able to run pod install afterwards.Rigamarole
D
5

You should never modify Podfile.lock directly. It's generated by pod install. If you want to remove a Pod, edit Podfile, delete the Pod you want, and rerun pod install.

Deflagrate answered 27/3, 2020 at 19:27 Comment(2)
If i deleted podfile.lock file, that makes an issue or it's normally?Refit
Generally you should not delete the podfile.lock, but if you do, I believe rerunning pod install should fix it.Deflagrate

© 2022 - 2025 — McMap. All rights reserved.