1

I was using a pod file in my previous iOS project which I want to include in my new project as well. But it has been deprecated and I am unable to include it using pod install in terminal. How to do it?

Edit1: Is there a way to manually include a pod from an existing project instead of "pod installing" it?

crypt
  • 449
  • 5
  • 15
  • 1
    I don't know anything about pods, but are you _sure_ you want to use one that's been deprecated? Presumably there's a reason for that, e.g. it no longer receives security updates, or only works with an old version of the SDK, etc. It might be better to find a similar pod that _is_ supported and use that instead. – ChrisGPT was on strike Jul 12 '16 at 12:56
  • Its because this pod was being used extensively in an old project and I need to work on that. Upgrading to a newer version is neither required nor possible. – crypt Jul 14 '16 at 06:28

2 Answers2

1

If you want to install deprecated pods, just include the version of that pod when you declare it in the Podfile.

For example, in order to install version 2.6.3 of AFNetworking via Cocoapods, here's how you would declare it in the Podfile:

pod ‘AFNetworking’, ‘2.6.3’

Doing a pod install installs it correctly.

Akilan Arasu
  • 350
  • 1
  • 5
  • 17
  • I tried doing that but I am getting an error on the terminal which asks me to download another pod in which my required pod is included now. But I cannot do so due to some other reasons. Is there a way to manually include that pod from an existing project instead of "pod installing" it? – crypt Jul 14 '16 at 06:30
0

The Podfile.lock file holds the version of the pods you were using, so if you have the Podfile and Podfile.lock, you can make a pod install and it should install the same pods.

Cristian
  • 238
  • 1
  • 3
  • 13
  • While doing that terminal gives an error and directs me to install another pod in which my required pod has been included. But I don't want to install that. – crypt Jul 14 '16 at 06:34