how to install speacific podfile in ios with out touching other podfiles - ios

I want to install specific dependency using cocoapods. if I execute pod install, other dependencies are updating before installing my newly added dependency. I just want to install specific pod without touching other dependencies. And I know deleting, updating any dependency also updates others. Is there any way to solve this problem?
Actually my problem is when I myself modify some dependency and run pod install it reverts back to its original version. But I don't want to lose my changes
Any suggestion will be appreciated.

Make sure that Podfile.lock is in the same folder as Podfile is.
Add a line in the Podfile
pod 'MBProgressHUD','~> 0.9'
cd to your project and use the following line in the Terminal, it'll install just the above pod you specified.
pod install podName
From official website here's the link!
Running pod install will install the current version of RestKit, causing a Podfile.lock to be generated that indicates the exact version installed (e.g. RestKit 0.10.3). Thanks to the Podfile.lock, running pod install on this hypothetical project at a later point in time on a different machine will still install RestKit 0.10.3 even if a newer version is available. CocoaPods will honour the Pod version in Podfile.lock unless the dependency is updated in the Podfile or pod update is called (which will cause a new Podfile.lock to be generated). In this way CocoaPods avoids headaches caused by unexpected changes to dependencies.

Related

Error in installing pods with pod install

got an error in installing pods while doing pod install. I have tried cleaning, deintegrating and reinstalling pods.
i also cleaned the project many times but got no positive results.
[!] The plist file at path `path` doesn't exist.
in most of the case it happen because there is some problem in cocoapod library or cocoapod library is not installed so try below code in terminal and install cocoapod
may it will work
sudo gem uninstall cocoapods
Verify that you have moved to the correct folder where the pod file is located

How to install specific pod file without updating other dependencies?

I am trying to install 2 pod files without affecting/updating other dependencies in my pod file.
I tried with pod install --no-repo-update command. It is not working.
I want to install Fabric pod file when I try to install other dependencies are also updating and I don't want it because some dependencies are deprecated and it will show some warning and error, this is I don't want so I am trying to install pod without affecting and updating other pod files.
Here is the screenshot, in xcode I am getting 197 warnings. Before the installation of pod file there were 6 Xcode warnings.
pod 'Fabric'
pod 'Crashlytics'
You cannot install specific pod but you update specific pod.
Reference
https://guides.cocoapods.org/using/pod-install-vs-update.html
Pod install
Use pod install to install new pods in your project. Even if you already have a Podfile and ran pod install before; so even if you are just adding/removing pods to a project already using CocoaPods.
Pod Update
Use pod update [PODNAME] only when you want to update pods to a newer versio
To install new pod without updating others, just open up the existing file and add your pod file below the existing pods.
Now, go to terminal and open up your project and run command:
$ pod install
Note: This way, it will only add new pod without updating your existing pods.

How to download a deprecated pod

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?
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.
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.

How to add pod 0.3.3

I have downloaded a PNChart which is present in the given link
https://github.com/kevinzhow/PNChart/blob/master/README.md
To Run the project i need to follow these requirements
CocoaPods is the recommended way to add PNChart to your project.
Add a pod entry for PNChart to your Podfile pod 'PNChart', '~> 0.5'
Install the pod(s) by running pod install.
Include PNChart wherever you need it with #import "PNChart.h".
without installing them i get these errors. and I dont know how to add these to the project can someone guide me the process and explain what all these are ? and why i have to add these ? I get the below errors when i run the downloaded project from GitHub . I have no knowledge in mac and Terminal
Seems that you don't have the cocoapods installed. You need it to run the Pod Install command.
Open your terminal, run:
gem install cocoapods
Then, go to your project directory in terminal, you can use the "cd" command to do it.
When you are in your project's folder, run pod install.

Cocoapods staying on "analyzing dependencies"

I'm using cocoapods to manage my dependencies. All have been working fine. Now, When I'm creating a new project, added the following to my podfile,
platform :ios, '6.1'
pod 'RestKit', '~> 0.20.0'
when i'm doing pod install, it is continually staying on analyzing dependencies.
Any idea why this problem?
I had the same problem, and since my output with --verbose was different than the linked SO answer, I'm including that response along with a verification that it worked for me:
$ pod repo remove master
$ pod setup
$ pod install
Another way to fix that is to delete the Pods folder and the Podfile.lock file and run pod install again.
As of CocoaPods version 1.8.0 trunk is used instead of master. So you need to execute the following commands:
$ pod repo remove trunk
$ pod setup
$ pod install
Something that seemed to work for me:
Cancel first attempt using Ctrl-C
Reattempt using pod install
Also, once the pod has installed successfully, be sure to close the current project before opening the project.workspace.
i2097i's comment was the fix for me (so I can't take credit for this, and can't seem to upvote his comment).
Check for any uncommitted changes (I had just added my Podfile but it was not committed). Staging and committing got pod install working.
$ pod repo remove trunk
$ pod setup
run above two commands it will solve problem
pod repo update
pod install
easy and quick fixed my problem

Resources