[英]Adding new framework to existing Podfile using CocoaPods
I have an existing Podfile that specifies one framework. 我有一个指定一个框架的现有Podfile。 I want to add another, using CocoaPods. 我想使用CocoaPods添加另一个。
At this point, I have modified the existing Podfile (using Xcode) to specify the new framework. 此时,我已经修改了现有的Podfile(使用Xcode)以指定新框架。 Following instructions in the accepted answer to this question , I get this response in Terminal 按照此问题的可接受答案中的指示进行操作,我将在终端中收到此响应
[!] You cannot run CocoaPods as root. (CLAide::Help)
Can someone please put me on the right track, hopefully with simple step by step instructions for my simple brain? 有人可以请我走上正确的道路,希望对我的简单大脑有简单的逐步说明吗? I've only used Terminal once before, when I installed CocoaPods and my existing framework, a process for which I successfully followed the tutorial here , but it was intended for creating the Podfile from scratch. 我只用一次航站楼前,当我安装的CocoaPods和我现有的框架,一个过程,我成功地跟着教程在这里 ,但是它的目的是从头开始创建Podfile。
Many thanks! 非常感谢!
A) Make sure you're putting the 2nd pod on a new line A)确保将第二个Pod放在新的一行上
B) Make sure terminal is in the directory of your podfile. B)确保终端在您的Podfile目录中。 Just open terminal, type: 只需打开终端,输入:
cd (path/to/podfile)
You can get the path easily by dragging in the file from finder into the terminal window. 通过将文件从finder拖到终端窗口中,可以轻松获得路径。
I deleted, then pasted (from the GitHub repository) the line in the Podfile for the new dependency, then did pod install
again. 我删除了,然后(从GitHub存储库中)将Podfile中的行粘贴到新的依赖项中,然后再次进行pod install
。 CocoaPods took it from there and reinstalled the existing pod plus the new one. CocoaPods从那里拿走了它,然后重新安装了现有的吊舱以及新的吊舱。
Go figure--I can't explain it. 好吧,我无法解释。 The spelling was identical... 拼写是相同的...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.