本文翻译自:Remove or uninstall library previously added : cocoapods
I added an external framework via cocoapods into my iOS application. 我通过cocoapods将一个外部框架添加到我的iOS应用程序中。 How can i remove that library from the project? 如何从项目中删除该库?
#1楼
参考:https://stackoom.com/question/vhIh/删除或卸载以前添加的库-cocoapods
#2楼
从Podfile中删除lib,然后再次pod install
。
#3楼
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编写的脚本删除 - 解体 ,我将在此处发布正确的工作流程:
Install clean: 安装干净:
$ sudo gem install cocoapods-clean
Run deintegrate in the folder of the project: 在项目的文件夹中运行deintegrate:
$ pod deintegrate
Clean: 清洁:
$ pod clean
Modify your podfile (delete the lines with the pods you don't want to use anymore) and run: 修改您的podfile(删除包含您不想再使用的pod的行)并运行:
$ pod install
Done. 完成。
#4楼
- Remove pod name(which to remove) from Podfile and then 从Podfile中删除pod名称(要删除),然后
- Open Terminal, set project folder path 打开终端,设置项目文件夹路径
- Run pod install --no-integrate 运行pod install --no-integrate
#5楼
Remove the library from your Podfile 从Podfile中删除库
Run
pod install
on the terminal 在终端上运行pod install
#6楼
Remove pod name from Podfile
then Open Terminal, set project folder path and Run pod update
command. 从Podfile
删除pod名称,然后打开Terminal,设置项目文件夹路径和Run 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中删除其名称的库。