I have this Podfile
platform :ios
pod 'ShareKit'
pod'SVProgressHUD'
pod 'HockeySDK'
Now I want to add a new library, but leave the existing ones untouched. Is that possible without having to add the version number to the libraries, and how do I do it?
Thanks
Just modify the podfile with the existing libraries, along with the new library name
and execute pod install
For example adding AFNetworking
Update pod file as
platform :ios
pod 'ShareKit'
pod'SVProgressHUD'
pod 'HockeySDK'
pod 'AFNetworking', '0.9.1'
Then call
pod install
To install the changes you have made to your Podfile, or to bootstrap your installation for a project which doesn't keep the Pods folder under version control, use:
$ pod install
Pod install will not update your dependencies even if a new version is available, to update them you can use:
$ pod update
Related
I've installed CDYelpFusionKit using CocoaPods, but I run into an error 65 since the package uses AlamoFireObjectMapper 5.2.0, which is incompatible with Swift 5. AlamoFireObjectMapper 5.2.1 has been released here https://github.com/tristanhimmelman/AlamofireObjectMapper/releases/tag/5.2.1, but it hasn't been released on CocoaPods. I'm trying to figure out how to replace the AlamoFireObjectMapper dependency that comes with the CDYelpFusionKit package with an updated branch from here https://github.com/RomanPodymov/AlamofireObjectMapper. I've tried the following in my podfile, then run pod repo update and pod install:
source 'https://github.com/CocoaPods/Specs.git'
source 'https://github.com/RomanPodymov/AlamofireObjectMapper.git'
platform :ios, '9.0'
target 'Demand' do
use_frameworks!
pod 'Google-Mobile-Ads-SDK'
pod 'CDYelpFusionKit', '~> 1.5.1'
pod 'AlamofireObjectMapper', :git => 'https://github.com/RomanPodymov/AlamofireObjectMapper.git', :branch => 'xcode-10-2-fix'
end
But I get the error:
"[!] CocoaPods could not find compatible versions for pod "AlamofireObjectMapper":
In Podfile:
AlamofireObjectMapper (from `https://github.com/RomanPodymov/AlamofireObjectMapper.git`, branch `xcode-10-2-fix`)
CDYelpFusionKit (= 1.5.1) was resolved to 1.5.1, which depends on AlamofireObjectMapper (= 5.2.0)"
1.) Update CocoaPods to its newest version
2.) Try to delete your lock file and run pod install after that, usually, it installs way newer versions of everything. Also, if your project is ios 9+, modify your platform to something bigger in yor podfile
I hope it is obvious but make a copy of your project folder before trying this solution if you are not using any version control or something along the line
Podfile Contents
platform :ios, '11.0'
target 'AVWXKit' do
use_frameworks!
pod 'AVWXKit'
end
Terminal Input: pod install
Error Message:
You have either:
* out-of-date source repos which you can update with `pod repo update`
or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
I have tried repo update to no avail. Any help appreciated
Using pod version 1.9.1
It seems that pod was never pushed to trunk: when I do pod search AVWXKit I get:
Unable to find a pod with name, author, summary, or description matching AVWXKit
To work around that, get the pod directly from its repo using:
pod 'AVWXKit', :git => 'https://github.com/JanC/AVWXKit'
I don't know what's wrong with my cocoapods. It always show this error on every pod libraries every time I run pod install. For instance "AFNetworking"
[!] Unable to find a specification for `AFNetworking (~> 3.0)`
I tried the following but nothing help:
pod repo update
sudo rm -fr ~/.cocoapods/repos/master
pod setup
pod install
I tried to update my cocoapods to 1.1.1, Xcode to 8.2 and Mac OS to 10.12.2 but problem remain.
My cocoapods can't even search. It show this error every time I run "pod search AFNetworking"
[!] Unable to find a pod with name, author, summary, or description matching `AFNetworking`
Here is my podfile look like:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
target 'Leader' do
use_frameworks!
pod 'AFNetworking', '~> 3.0'
end
I did try to uninstall and reinstall cocoapods back but nothing help.
Please follow below format in your pod file its working in project.
#Uncomment this line to define a global platform for your project
platform :ios, '8.0'
#Uncomment this line if you're using Swift
use_frameworks!
target 'applicationName' do
pod 'AFNetworking', '~> 3.0'
end
If you find any issue please let me know.
I need to upgrade one project to Swift 3.0, that has some libraries by Cocodpods.
So, I've removed all links related with Cocoapods and recreate pod file using pod init and upgrade some version of library such as AlamorFire.
But pod install said
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 4.0)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
I've updated deployment Target to 9.0 and using cocoapod 1.1.0
For test, I've created new project and added only Alamofire, but the result is same.
If you have some experience, please help me.
try sudo gem install cocoapods --pre
the pod file should look like
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target 'YourAPP' do
pod 'Alamofire', '~> 4.0'
pod 'SwiftyJSON', :git => 'https://github.com/acegreen/SwiftyJSON.git', :branch => 'swift3'
pod 'NetReachability'
end
Since you have an outdated pod repo, pod install getting failed. First of all you have to update your pod master repo before running pod install. Follow the steps given to update your pod repo and resolve the pod error.
Go to Cocoa Pods repo folder (~/.cocoapods/repos) and delete master folder
Run pod update on terminal. This will take several minutes to update pod repo.
When update get finished, run pod install (if required).
Hope this would be useful for those who are getting similar error :)
Xcode Version 7.3 (7D175)
SwiftyDropbox 3.0.0
I am following the installation instructions on https://www.dropbox.com/developers/documentation/swift#install
Installed CocoaPods via
$sudo gem install cocoapods
Not used Cocoapods before so run:
$pod setup
Created "Podfile" in project directory and added the following text to the Podfile:
platform :ios, '8.0'
use_frameworks!
pod 'SwiftyDropbox'
Closed xcode, navigated to project directory and executed install
$pod install
Result
`[!] The dependency SwiftyDropbox is not used in any concrete target.`
Any suggestions, this is my first time using CocoaPods, which seems to be a pretty useful library.
Suspect this is something to do with CocoaPods not SwiftyDropbox. Thanks.
Within the Podfile the following needs to be included.
platform :ios, '8.0'
use_frameworks!
target 'foo' do
pod 'SwiftyDropbox'
end