从项目中删除CocoaPods的正确方法是什么?我想移除整个CocoaPod。由于客户的限制,我不能使用它。我只需要一个xcodeproj,而不是一个xcworkspace。
当前回答
如果你只想删除一个pod,并保留其他你可能已经安装的pod,打开app目录中的podfile并删除你想删除的pod。然后使用终端导航到你的应用目录并输入:
pod update
这将删除您从podfile中删除的pod。你将在终端中看到它已被删除:
Analyzing dependencies
Removing FirebaseUI
Removing UICircularProgressRing
注意,这个方法也会拉出podfile中其他pod的任何更新。你可能想要也可能不想要。
其他回答
赛事deintegrate
在此cmd后,在您的项目中没有Cocoapods的痕迹。
但是你的工作区引用Pods项目仍然存在,你需要手动删除以下3个文件:
xx.xc工作区 波迪夫尔 Podfile.lock
然后您可以再次使用您的项目。
玩得开心!
测试CocoaPod版本= 1.2.0
我尝试了所有这些答案,但它仍然不会建立,最终我尝试了:
pod deintegrate
pod install
这真的有效!
就好像它需要从构建阶段删除所有的pod脚本,然后重新添加它们才能工作,至少在我的情况下是这样。
要从项目中完全删除pod,你需要先安装两件事…这些是以下(假设你已经在你的系统中安装了可可荚)…
Cocoapods-Deintegrate插件 Cocoapods-Clean插件
安装
Cocoapods-Deintegrate插件 在您的终端上使用以下命令来安装它。 Sudo gem安装cocoapods-deintegrate Cocoapods-Clean插件 在您的终端上使用以下命令来安装它。 须藤宝石安装椰荚干净
使用
首先进入你的项目文件夹,使用as usual命令,如..
cd (path of the project) //Remove the braces after cd
现在使用这两个插件完全删除它如下..
Cocoapods-Deintegrate插件 在您的终端上使用以下命令首先从项目中分解pod。 豆荚去积分
Cocoapods-Clean插件 从项目中分解pod后,在终端上使用以下命令彻底清理它。 舱清洁 在完成上述任务后,您的项目目录中应该还保留着Podfile .只需手动删除它或在终端上使用以下命令。 rm Podfile
这是……现在你有你的项目从豆荚自由…清洁。
将Cocoapods从系统中移除。
以任何方式尝试在您的终端上使用以下命令从您的系统中卸载/删除可口可乐。
sudo gem uninstall cocoapods
它会自动去除可乐皮。
谢谢。 希望这对你有所帮助。
删除所有相关pod文件:
xx.xc工作区 子文件 Podfile.lock
在Project Navigator中:
点击项目名称(蓝色图标)—> Targets(*)—> Build Phases—> Remove”[CP] Check Pods清单。(点击“x”)
(*)点击项目名称,你可能必须先点击“显示项目和目标列表”才能看到侧栏。
使用这些终端的命令(不要忘记在新行开始使用sudo):
open:YourDir YouName$ sudo gem uninstall cocoapods
Password:?
Remove executables:
pod, sandbox-pod
in addition to the gem? [Yn] Y
Removing pod
Removing sandbox-pod
Successfully uninstalled cocoapods-1.4.0
open:YourDir YourName$ gem list --local | grep cocoapods
cocoapods-core (1.4.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.3.0)
cocoapods-try (1.1.0)
逐个卸载列表,如下所示:
open:YourDir YourName$ sudo gem uninstall cocoapods-core
Successfully uninstalled cocoapods-core-1.4.0
open:YourDir YourName$ sudo gem uninstall cocoapods-trunk
Successfully uninstalled cocoapods-trunk-1.3.0
open:YourDir YourName$ sudo gem uninstall cocoapods-try
Successfully uninstalled cocoapods-try-1.1.0
open:YourDir YourName$ gem list --local | grep cocoapods
open:YourDir YourName$ sudo gem uninstall cocoapods-stats
Successfully uninstalled cocoapods-stats-1.0.0
open:YourDir YourName$ sudo gem uninstall cocoapods-search
Successfully uninstalled cocoapods-search-1.0.0
open:YourDir YourName$ sudo gem uninstall cocoapods-downloader
Successfully uninstalled cocoapods-downloader-1.1.3
open:YourDir YourName$ sudo gem uninstall cocoapods-plugins
Successfully uninstalled cocoapods-plugins-1.0.0
open:YourDir YourName$ gem list --local | grep cocoapods
cocoapods-deintegrate (1.0.2)
open:YourDir YourName$ sudo gem uninstall cocoapods-deintegrate
Successfully uninstalled cocoapods-deintegrate-1.0.2
open:YourDir YourName$ sudo gem uninstall cocoapods-stats
Successfully uninstalled cocoapods-stats-1.0.0
open:YourDir YourName$ sudo gem uninstall cocoapods-search
Successfully uninstalled cocoapods-search-1.0.0
open:YourDir YourName$ sudo gem uninstall cocoapods-downloader
Successfully uninstalled cocoapods-downloader-1.1.3
open:YourDir YourName$ sudo gem uninstall cocoapods-plugins
Successfully uninstalled cocoapods-plugins-1.0.0
open:YourDir YourName$ gem list --local | grep cocoapods
cocoapods-deintegrate (1.0.2)
open:YourDir YourName$ sudo gem uninstall cocoapods-deintegrate
Successfully uninstalled cocoapods-deintegrate-1.0.2
推荐文章
- Ios模拟器:如何关闭应用程序
- 准备好开发人员ID的macOS安装程序包
- 创建配置文件失败
- 在成功提交我的应用程序后,“太多符号文件”
- 复制并重命名Xcode项目和相关文件夹
- iOS -构建失败,CocoaPods无法找到头文件
- Xcode 4挂在“附加到(应用程序名称)”
- 为什么单元测试中的代码不能找到包资源?
- Xcode 10的对象库去哪了?
- Xcode 10的UI元素在哪里?
- Xcode构建失败“架构x86_64未定义的符号”
- 如何使用Xcode创建。ipa文件?
- 我可以在没有“构建和运行”的情况下启动iPhone模拟器吗?
- Cocoapods命令失败,提示“No such file or directory @ dir_initialize - /Users/<username>/”。cocoapods /回购(Errno: ENOENT):“
- Xcode 4 -在新的Macintosh安装上的配置文件上“没有找到有效的签名标识”错误