从项目中删除CocoaPods的正确方法是什么?我想移除整个CocoaPod。由于客户的限制,我不能使用它。我只需要一个xcodeproj,而不是一个xcworkspace。
当前回答
赛事deintegrate
在此cmd后,在您的项目中没有Cocoapods的痕迹。
但是你的工作区引用Pods项目仍然存在,你需要手动删除以下3个文件:
xx.xc工作区 波迪夫尔 Podfile.lock
然后您可以再次使用您的项目。
玩得开心!
测试CocoaPod版本= 1.2.0
其他回答
使用这些终端的命令(不要忘记在新行开始使用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
从.plist中删除podfile名称 重新安装吊舱(使用此链接安装吊舱)
我尝试了所有这些答案,但它仍然不会建立,最终我尝试了:
pod deintegrate
pod install
这真的有效!
就好像它需要从构建阶段删除所有的pod脚本,然后重新添加它们才能工作,至少在我的情况下是这样。
删除所有相关pod文件:
xx.xc工作区 子文件 Podfile.lock
在Project Navigator中:
点击项目名称(蓝色图标)—> Targets(*)—> Build Phases—> Remove”[CP] Check Pods清单。(点击“x”)
(*)点击项目名称,你可能必须先点击“显示项目和目标列表”才能看到侧栏。
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean
$ rm Podfile
推荐文章
- Xcode构建失败“架构x86_64未定义的符号”
- 如何使用Xcode创建。ipa文件?
- 我可以在没有“构建和运行”的情况下启动iPhone模拟器吗?
- Cocoapods命令失败,提示“No such file or directory @ dir_initialize - /Users/<username>/”。cocoapods /回购(Errno: ENOENT):“
- Xcode 4 -在新的Macintosh安装上的配置文件上“没有找到有效的签名标识”错误
- Xcode +删除所有断点
- Swift:理解// MARK
- 自定义dealloc和ARC (Objective-C)
- 你常用的Xcode快捷键有哪些?
- 确保您的项目构建设置正在生成一个dSYM文件。对于所有配置,DEBUG_INFORMATION_FORMAT都应该设置为dwarf-with-dsym
- 如何改变时间和时区在iPhone模拟器?
- 为iOS模拟器构建,但链接框架'****.framework'是为iOS构建的
- 如何象征崩溃日志Xcode?
- Xcode - ld:没有为- lpods找到库
- 我如何输入RGB值到接口生成器?