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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 21:26:59  来源:igfitidea点击:

Remove or uninstall library previously added : cocoapods

iosiphoneipadcocoapods

提问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,我将在此处发布正确的工作流程:

  1. Install clean:

    $ sudo gem install cocoapods-clean
    
  2. Run deintegrate in the folder of the project:

    $ pod deintegrate

  3. Clean:

    $ pod clean

  4. Modify your podfile (delete the lines with the pods you don't want to use anymore) and run:

    $ pod install

  1. 安装干净:

    $ sudo gem install cocoapods-clean
    
  2. 在项目文件夹中运行 deintegrate:

    $ pod deintegrate

  3. 干净的:

    $ pod clean

  4. 修改您的 podfile(删除包含您不想再使用的 pod 的行)并运行:

    $ pod install

Done.

完毕。

回答by fannheyward

Remove lib from Podfile, then pod installagain.

从 Podfile 中删除 lib,然后pod install再次删除。

回答by user5807443

  1. Remove the library from your Podfile

  2. Run pod installon the terminal

  1. 从 Podfile 中删除库

  2. 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

  1. Remove pod name(which to remove) from Podfile and then
  2. Open Terminal, set project folder path
  3. Run pod install --no-integrate
  1. 从 Podfile 中删除 pod 名称(要删除的名称),然后
  2. 打开终端,设置项目文件夹路径
  3. 运行 pod install --no-integrate

回答by Roohul

Remove pod name from Podfilethen Open Terminal, set project folder path and Run pod updatecommand.

删除 pod 名称,Podfile然后打开终端,设置项目文件夹路径和运行pod update命令。

NOTE: pod updatewill update all the libraries to the latest version and will also remove those libraries whose name have been removed from podfile.

注意:pod update将所有库更新到最新版本,并将删除名称已从 podfile 中删除的那些库。