SwiftyDropbox with Alamofire issue - cocoapods

I have the following line in my Podfile:
pod 'Alamofire', '~> 4.7'
Problem is when I add the line 'pod SwiftyDropbox', there is an issue when I run pod update:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Alamofire":
In Podfile:
Alamofire (~> 4.7)
SwiftyDropbox was resolved to 2.0.1, which depends on
Alamofire (~> 2.0.2)
Besides there are warnings in both Alamofire as well as SwiftyDropbox framework. How do I get the latest version of SwiftyDropbox to run in XCode 9.3 and Swift 4?

A few things that aren't mentioned in the SwiftyDropbox documentation, but which are essential for avoiding/solving this:
You need to specify the version of SwiftyDropbox in the Podfile. Like this:
pod 'SwiftyDropbox', '~> 5.0.0'
Once you've specified the version in the Podfile and run pod install again, you'll get this error:
$ pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "SwiftyDropbox":
In Podfile:
SwiftyDropbox (~> 5.0.0)
None of your spec sources contain a spec satisfying the dependency: `SwiftyDropbox (~> 5.0.0)`.
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.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
As the error message says, you need to manually run pod repo update. Why? Who knows, but you need to do it.
Once you've done that, and it has fetched the SwiftyDropbox sources, run pod install and it will work this time. The output will include "Installing SwiftyDropbox (5.0.0)".

Related

Just pushed a new version of the pod to cocoapods, but can't install it

So I've just successfully uploaded a new release (1.0.1) of my pod (pod trunk push MonarchRouter.podspec), but getting this message when trying to pod install
CocoaPods could not find compatible versions for pod "MonarchRouter":
In Podfile:
MonarchRouter (~> 1.0.1)
None of your spec sources contain a spec satisfying the dependency: `MonarchRouter (~> 1.0.1)`.
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'm pretty sure it's non of the above.
You should clean up cocoapods cache.
rm -rf ~/Library/Caches/CocoaPods
Found the answer somewhere in an unrelated thread on github, just wanted to leave it here.
Delete the local pod specs from here
~/.cocoapods/repos
then pod install again

.xcworkspace wasn't found after pod install with no error message

I am a newbie in cocoapods and I would be appreciated if you help.
Today I want to use cocoapods to manager my dependencies in my project.
So my Profile is:
platform :ios, '8.0'
target 'TargetName' do
pod 'AFNetworking', '~> 3.0'
end
But after running pod install, I got the message as follow:
pod install
Analyzing dependencies
Downloading dependencies
Installing AFNetworking (3.1.0)
Generating Pods project
[1] 53417 abort pod install
After that, I can't find the TargetName.xcworkspace and the Podfile.lock but the Pods folder is there.
That's weird because there are no more error messages here.
I installed the cocoapods exactly according to the official guides. And here are the environments:
pod: 1.1.1
ruby: 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin16]
gem: 2.6.8
Xcode: 8.2.1
Thank you very much!
Finally I upgrade cocoapods(now Version 1.2.0.beta.1) and solve my problem.

Error while installing and updating SDWebImage with pod file

When try to install pod file two components return error in terminal.
I am using Objective-c and iOS9.
please help me.
podfile:
pod 'DZNPhotoPickerController', '~> 1.6'
pod 'SDWebImage', '~> 3.7'
Errors in terminal:
pod install
Updating local specs repositories
Analyzing dependencies
[!] Unable to satisfy the following requirements:
SDWebImage (~> 3.7) required by Podfile
SDWebImage (= 3.7.3) required by Podfile.lock
SDWebImage (= 3.7) required by DZNPhotoPickerController/Core (1.6.0)
Reza Jan,
you can delete Podfile.lock and try pod install again. It will help with your second line of error. and remove pod 'SDWebImage', '~> 3.7' because it will be added as a dependency of DZNPhotoPickerController anyway.
Cheers

Require specific version of CocoaPods to be installed form Podfile

In our project we want to ensure that all developers are using the same version of CocoaPods by adding a version verification within the Podfile as a prerequisite check when a developer attempts to perform pod install or pod update.
Is it possible to achieve this from within the Podfile?
To do this you'll need to create a Gemfile, which is like a Podfile for RubyGems, which CocoaPods is distributed as. There is a guide to do this for CocoaPods here. Mainly you'll create a Gemfile with something like:
source 'https://rubygems.org'
gem 'cocoapods', '~> 0.38.2'
Then you can install your specified version with bundle install. This will install the same version on all developer's machines. After that you'll run bundle exec pod install to make sure that pod install is run by the version specified in your Gemfile (which may not be the case if the user has multiple version of CocoaPods installed).

cocoapods: cant install latest AMScrollingNavbar through cocoapods

pod --version : 0.38.2
Unable to install latest version of AMScrollingNavbar through cocoapods, if I don't specify the version, it installs version 1.5.1.
If I specify version as: pod 'AMScrollingNavbar', '~> 2.0.0'
I get: Analyzing dependencies
[!] Unable to satisfy the following requirements:
AMScrollingNavbar (~> 2.0.0) required by Podfile
If I do: pod 'AMScrollingNavbar (~> 2.0.0)'
I get: Analyzing dependencies
[!] Unable to find a specification for AMScrollingNavbar (~> 2.0.0)
changed to pod 'AMScrollingNavbar', '~> 2.0.0-beta7' and installed latest one.

Resources