I ran pod install after I updated my Podfile, the LeanCloud pod was not installed, and I got the following message:
Analyzing dependencies
[!] There are only pre-release versions available satisfying the following requirements:
'LeanCloud', '>= 0'
You should explicitly specify the version in order to install a pre-release version
Here is how my Podfile looks like:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'todolist' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for todolist
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'LeanCloud', '>= 0'
end
I'm running on macOS 10.12.3, with Cocoapods Version 1.2.0
You have to specify which version of a dependency you’d like to use. Take a look here how versioning works:
== 1.0 means “Use exactly version 1.0”
>= 1.0 means “Use version 1.0 or higher”
~> 1.0 means “Use any version that’s compatible with 1.0″, essentially meaning any version up until the next major release. That is:
If you specify ~> 1.7.5, then any version from 1.7.5 up to, but not including 2.0, is considered compatible.
Likewise, if you specify ~> 2.0 then Cocoapods will use a version 2.0 or later, but less than 3.0.
Compatibility is based on Semantic Versioning
From here, you have to choose which LeanCloud version you want to use. Then change it accordingly in your pod file based on those steps above.
I am not very good in English
I think you did not specify a mobile version
platform :ios, '9.0' <-You should try to open this sentence
Somehow I got it to work by move the line pod LeanCloud to be the first pod, and ran pod update.
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'todolist' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for todolist
pod 'LeanCloud'
pod 'Alamofire'
pod 'SwiftyJSON'
end
⇒ pod update
Update all pods
Updating local specs repositories
CocoaPods 1.2.1.beta.1 is available.
To update use: sudo gem install cocoapods --pre
[!] This is a test version we'd love you to try.
For more information, see https://blog.cocoapods.org and the CHANGELOG for this version at https://github.com/CocoaPods/CocoaPods/releases/tag/1.2.1.beta.1
Analyzing dependencies
Downloading dependencies
Installing Alamofire 4.2.0 (was 4.4.0)
Installing LeanCloud (10.0.0)
Using SwiftyJSON (3.1.4)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There are 3 dependencies from the Podfile and 3 total pods installed.
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
When I run pod install cocoapods installs several pods not listed in the current projects Podfile:
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PodUser' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Pods for PodUser
pod "PodTest"
end
My pod install output:
pod install
Analyzing dependencies
Downloading dependencies
Using AFNetworking (3.1.0)
Using FirebaseAnalytics (3.9.0)
Using FirebaseCore (3.6.0)
Using FirebaseInstanceID (1.0.10)
Using Google (3.1.0)
Using GoogleAnalytics (3.17.0)
Using GoogleToolboxForMac (2.1.1)
Using PodTest (0.0.1)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 8 total pods installed.
CocoaPods installs the specified pods and all of those pods' dependencies.
If you look at PodTest.podspec and its dependencies and recursively follow the podspec's for those dependencies, it should match the pods that get installed.
See also the file Podfile.lock that gets created alongside the Podfile to see a list of the relevant pods and their dependencies.
I'm using the Cocoapods app. When trying to install the current Alamofire, I get the following error:
Analyzing dependencies
[!] Unable to satisfy the following requirements:
- `Alamofire (~> 4.4)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Alamofire (~> 4.4)`.
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
This is my podfile:
project 'MyApp.xcodeproj'
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
target 'MyApp' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'Alamofire', '~> 4.4'
end
If I remove the version and just use pod 'Alamofire', it installs version 4.0.1. Why?
The issue is as per the last line of the log.
You need to run pod repo update
There appears to be an option in the app in the menu Specs Repos that has an update button for me. However this does not seem to work.
Running the command line then allowed mre to run Build->Install from the Cocoapods app
This might be happening due to the cocoa pod version required by the new almofire version is higher than what u have installed in your system. Please check version of ypu pod by pod --version in command line , if it is less than 1.0 update pod spec , you can find the steps here .https://guides.cocoapods.org/using/getting-started.html
Your new pod will be installed. Also the when u don not specify a version in your pod file than cocoa pods itself selects the latest version it supports and install it .Thats why your almofire was getting updated to 4.0.1.,Hope this helps you.
Im trying to use the version > 1.24 of Lock (https://github.com/auth0/Lock.iOS-OSX), but my cocoa repo has not available this version. I execute pod search Lock and i see the follow info:
Lock (1.13.0)
A library that uses Auth0 for Authentication with Native Look & Feel
pod 'Lock', '~> 1.13.0'
- Homepage: https://github.com/auth0/Lock.iOS-OSX
- Source: https://github.com/auth0/Lock.iOS-OSX.git
- Versions: 1.13.0, 1.12.1, 1.12.0, 1.11.3, 1.11.2, 1.11.1
The version in the repo is 1.27, and my repo is old. I try to update using pod repo update but still unavailable
¿Someone can help me?
Im trying to use this podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '10.0'
target 'TalkClassTest' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for TalkClassTest
target 'TalkClassTestTests' do
inherit! :search_paths
pod 'Lock', '~> 1.24'
end
end
but when i execute pod install i obtain this erros:
[!] Unable to satisfy the following requirements:
- `Lock (~> 1.24)` required by `Podfile`
None of your spec sources contain a spec satisfying the dependency: `Lock (~> 1.24)`.
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.
MacBook-Air-de-Randall:TalkClassTest Randal$
thank to everyone, the solution applied is execute the follow commands: pod repo remove master and after pod setup
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