I'm trying to add a pod from Cocoapods website. I haven't used pods before this, so I'm a bit of a nascence with it. I've added the cocoapods program in the terminal and via their client software from the cocoapods website. When trying to add the pod from the terminal I got into a loop in the Podfile file. When using the client software I got a messaging saying successfully installed, but it ends u not actually adding on my project. I'm just trying to add the "SwiftyGif pod" to my gif making app. I've followed step-by-step of the installation on the Cocoapods website. I just can't get it to work after trying for the last week. Any suggestions would be very helpful. Thanks.
- Can you add some details about what commands you used and what did the terminal show you?Sweeper– Sweeper2017-12-27 03:20:37 +00:00Commented Dec 27, 2017 at 3:20
- Read the how to at least 10 times. Maybe you will figure out.Dominik Bucher– Dominik Bucher2017-12-27 03:20:37 +00:00Commented Dec 27, 2017 at 3:20
- @DominikBucher Honestly I did. I've followed the steps and kept getting myself into a loop when editing the pod file. Every time I saved the pod file it made me rewrite it..TimeFluid– TimeFluid2017-12-27 03:44:06 +00:00Commented Dec 27, 2017 at 3:44
- check this link stackoverflow.com/questions/20755044/how-to-install-cocoapodsUma Madhavi– Uma Madhavi2017-12-27 04:39:46 +00:00Commented Dec 27, 2017 at 4:39
Add a comment |
1 Answer
You have to run
pod init in the directory of your app, which will allow you to install it. Save the pod file, and then run
pod install on the directory and open the workspace file, not the project file. Your pods should be their, underneath your app in the Xcode file explorer. Hope this works!
1 Comment
TimeFluid
Thank you for the fast reply. How do I tell it how to install the SwiftyGif pod then? Do I just run "pod 'SwiftyGif', '~> 3.1'" after "pod init" and before "pod install"?