ios 删除或卸载之前添加的库:cocoapods
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13751147/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove or uninstall library previously added : cocoapods
提问by Lithu T.V
I added an external framework via cocoapods into my iOS application. How can i remove that library from the project?
我通过 cocoapods 添加了一个外部框架到我的 iOS 应用程序中。如何从项目中删除该库?
采纳答案by Michal
Since the accepted answer's side effects have been removed by a script written by Kyle Fuller- deintegrate, I'll post the proper workflow here:
由于已接受的答案的副作用已被Kyle Fuller编写的脚本删除- deintegrate,我将在此处发布正确的工作流程:
Install clean:
$ sudo gem install cocoapods-clean
Run deintegrate in the folder of the project:
$ pod deintegrate
Clean:
$ pod clean
Modify your podfile (delete the lines with the pods you don't want to use anymore) and run:
$ pod install
安装干净:
$ sudo gem install cocoapods-clean
在项目文件夹中运行 deintegrate:
$ pod deintegrate
干净的:
$ pod clean
修改您的 podfile(删除包含您不想再使用的 pod 的行)并运行:
$ pod install
Done.
完毕。
回答by fannheyward
Remove lib from Podfile, then pod install
again.
从 Podfile 中删除 lib,然后pod install
再次删除。
回答by user5807443
Remove the library from your Podfile
Run
pod install
on the terminal
从 Podfile 中删除库
pod install
在终端上运行
回答by src
None of these worked for me. I have pod version 1.5.3 and the correct method was to remove the pods that were not longer needed from the Podfile and then run:
这些都不适合我。我有 Pod 版本 1.5.3,正确的方法是从 Podfile 中删除不再需要的 Pod,然后运行:
pod update
This updates your Podfile.lock file from your Podfile, removes libraries that have been removed and updates all of your libraries.
这将从您的 Podfile 更新您的 Podfile.lock 文件,删除已删除的库并更新您的所有库。
回答by K.D
- Remove pod name(which to remove) from Podfile and then
- Open Terminal, set project folder path
- Run pod install --no-integrate
- 从 Podfile 中删除 pod 名称(要删除的名称),然后
- 打开终端,设置项目文件夹路径
- 运行 pod install --no-integrate
回答by Roohul
Remove pod name from Podfile
then
Open Terminal, set project folder path and
Run pod update
command.
删除 pod 名称,Podfile
然后打开终端,设置项目文件夹路径和运行pod update
命令。
NOTE: pod update
will update all the libraries to the latest version and will also remove those libraries whose name have been removed from podfile.
注意:pod update
将所有库更新到最新版本,并将删除名称已从 podfile 中删除的那些库。