1

I have an existing Podfile that specifies one framework. I want to add another, using CocoaPods.

At this point, I have modified the existing Podfile (using Xcode) to specify the new framework. 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.

Many thanks!

2
  • Could you show your Podifle? Commented May 6, 2015 at 2:43
  • The Podfile contains only this: pod "MagicalRecord" ... I forgot that I had removed the spec I was attempting to add. Commented May 6, 2015 at 2:47

2 Answers 2

1

A) Make sure you're putting the 2nd pod on a new line

B) Make sure terminal is in the directory of your 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.

Sign up to request clarification or add additional context in comments.

3 Comments

OK, I managed to edit the Podfile, adding the new pod on a new line. Then I did pod install, which returned this: [!] Invalid Podfile` file: undefined local variable or method “FastttCamera”' for #<Pod::Podfile:0x007fe53b8abda8>. Updating CocoaPods might fix the issue.
Just tried to update cocoa pods with sudo gem update cocoapods and receive this: Nothing to update...
I deleted, then pasted (from the GitHub repository) the line in the Podfile for the new dependency, then did pod install again. CocoaPods took it from there and reinstalled the existing pod plus the new one. Go figure--I can't explain it. The spelling was identical... Anyway, thanks for the help, even if it didn't fix the apparent problem.
0

I deleted, then pasted (from the GitHub repository) the line in the Podfile for the new dependency, then did pod install again. CocoaPods took it from there and reinstalled the existing pod plus the new one.

Go figure--I can't explain it. The spelling was identical...

2 Comments

"You cannot run CocoaPods as root". I bet that before you was trying to run sudo pod install, which runs pod utility as root
You're right, in one case at least. Unfortunately, I've shut Terminal down so can't check on the other several attempts, which yielded the same results.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.