I'm trying to use two pods--JGAFImageCache and ADNKit--that specify different versions of AFNetworking. Here's my Podfile:
platform :ios, '7.0'
pod 'AFNetworking'
pod 'ADNKit'
pod 'JGAFImageCache'
pod 'DerpKit'
pod 'SVProgressHUD'
pod 'SSKeychain'
pod 'iOS7Colors', '~> 2.0.0'
When running pod install, I get this message:
[!] ADNKit (1.3.1) tries to activate AFNetworking (~> 1.3.0)', but already activated version2.0.0-RC3' by Podfile, AFNetworking (2.0.0-RC3), AFNetworking/Core (2.0.0-RC3), AFNetworking/Core (2.0.0-RC3), AFNetworking/Core (2.0.0-RC3), and AFNetworking/Core (2.0.0-RC3).
Removing AFNetworking and relying on v1.3.0 in ADNKit results in this:
[!] JGAFImageCache (1.1.0) tries to activate AFNetworking (~> 1.2.0)', but already activated version1.3.3' by ADNKit (1.3.1).
I'd be happy working with v1.3.1; I don't need the latest version of AFNetworking.
How do I get JGAFImageCache and ADNKit to stop fighting over which version of AFNetworking to use?
Obviously, your best bet is to file an issue with those developers to use up to date dependencies. The problem is that those pods rely on AFNetworking's API to not change, so there could be issues if you try to use a later version and some of the API has been removed.
Another approach would be to fork those repos and then change the dependencies within the podfiles yourself so that they are both using the same dependency. Then you'd just point your app's podfile to install them from your forked repo. This could break something, so you'll have to check for yourself and it's obviously not a good long term solution.
pod 'ADNKit', :git => 'https://github.com/yourUsername/ADNKit.git'
Related
I am developing react-native app.
I followed the firebase instruction adding my iOS app to my firebase project.
In my Podfile, I have:
pod 'Firebase/Crashlytics'
pod 'Firebase/Analytics'
when I run pod install I keep getting the error saying "CocoaPods could not find compatible versions for pod "Firebase/Crashlytics".
Xcode version 11.7, target iOS10.1
Why I get that error and how to get rid of it?
(I tried run pod update 'Firebase', I get:
[!] The Firebase Pod is not installed and cannot be update)
Make sure that your project's minimum deployment target (the one that referenced in your Podfile) is at least iOS 9 (see Firebase/Crashlytics release notes)
Unfortunately when cocoapods initially create the Podfile, doesn't take into account your projects minimum deployment target. Instead adds a default value in a comment.
The first time that you run pod install you will get a warning about not specified minimum deployment target. Also cocoapods documentation doesn't mention anything regarding this behavior.
So, you have to have to manually edit your Podfile and add something like this:
platform :ios, '10.1'
No issue with the deployment target but got the same error. It was working with the following versions of Firebase
pod 'Firebase/Core', '~> 3.0.0'
pod 'Firebase/Crashlytics', '~> 7.0.0'
When I added a new dependency and run pod install, It was showing the error for Firebase. So, I used the >= 0 in place of the version.
pod 'Firebase/Core', '>= 0'
pod 'FirebaseCrashlytics', '>= 0'
This will install the latest version for all Firebase dependencies.
I have installed Crashlyticsusing pod.
pod 'Fabric'
pod 'Crashlytics'
But after updating the pod file Starscream 1.1.4 (was 1.1.1) also get updated. Now build the project shows me following error
Can anyone help me how to solve it? Any idea?
UPDATE
I did as #Ivan said then I am getting the following error
Starscream pod has been updated for Swift 3 now, so when you install new pods, it has been also updated to new version for Swift 3.
If you don't want to update Starscream, you need to keep pod lock file generated when you install pod at the first time. It should fix your pod versions as it was.
If you did update pod (not just install), lock file never work for you.
Cheers
I have the following cocoapods Podfile
platform :ios, '8.0'
use_frameworks!
target 'Foo' do
pod "SwiftyJSON", '~> 2.2.0'
pod "Locksmith"
pod "GoogleMaps"
pod "RealmSwift"
end
target 'FooTests' do
end
I'm also using cocoapods 0.37.2. For some reason, when I try to run the app, it complains with the following error, when clearly I have specified that my project requires SwiftyJSON 2.2.0 or greater:
Reason: Incompatible library version: Foo requires version 2.0.0 or later, but SwiftyJSON provides version 1.0.0
I have verified that there's no other dependencies on SwiftyJSON (using cocoapods-dependencies):
$pod dependencies
Dependencies
---
- GoogleMaps (1.10.1)
- Locksmith (1.2.2)
- Realm (0.93.2):
- Realm/Headers (= 0.93.2)
- Realm/Headers (0.93.2)
- RealmSwift (0.93.2):
- Realm (= 0.93.2)
- SwiftyJSON (2.2.0)
As you can see, no one is pulling SwiftyJSON 1.0.0. By the way, the reason I'm using cocoapods 0.37.2 is because of this bug when I tried to use 0.38.1: https://github.com/CocoaPods/CocoaPods/issues/3890.
Have I missed anything here (regarding the SwiftyJSON version mismatch) ? I've tried cleaning the project, redoing pod install, etc without any luck..
Thanks in advance!
For me (and for you it seems), the following worked:
Remove guilty pods from podfile (in my case, AFNetworking and AFNetworkActivityLogger)
pod install to wipe them out
Upgrade (or downgrade if you're on 0.38.1) to cocoapods 0.38.0
Add pods back & pod install
Now I'm back in business... I believe 0.38.1 was responsible for getting me into this mess.
I'm trying to import Parse SDK with cocoapods (version 0.37.2). I have recentl but right after doing a pod install There is no Parse.framework in the Pod folder...
When I try to build the app, it failed because with it doesn't find the parse.h from #import <Parse/Parse.h> in the bridging header file (which is quite normal because there is no Parse Framework).
Is this possible that as I previously used Parse for another project, when my computer downloads it, it changes the name, such as Parse.framework(2) and then the system can't retrieve it...
Here are the messages from terminal right after the pod install (which look good):
Analyzing dependencies
Downloading dependencies
Installing Bolts 1.2.0 (was 1.2.0)
Installing Parse 1.7.5 (was 1.7.5)
Generating Pods project
Integrating client project
And this is what the podfile looks like :
platform :ios, '8.0'
source 'https://github.com/CocoaPods/Specs.git'
`pod 'Parse', '~> 1.7.5'``
Last point: I have recently upgraded my version of rbenv (from 2.1.2 to 2.2.2) and as Cocoapods is in ruby, I am wondering there could be a link....
Any help would be grateful !
Thanks
What is your version of your cocoapods?
If you are using 0.38.0, it might be changes of CocoaPods make the spec fail. Try to replace
pod 'Parse', '~> 1.7.5'
with
pod 'Parse', podspec: 'https://gist.githubusercontent.com/siuying/6a548f1924ed3243aeb5/raw/ccea130108b14afbaf22dbe828f75a62d750a4a0/Parse.podspec.json'
and see if it works for you.
If your "Objective-C Bridging Header" in project level it's possible to get this error. You should set this in target level! After added in your target please don't forget to remove from project level. This must solve your problem, I solve like this.
Senario:
I'm studying parse.com inter-table relationship via code.
I've set up a cocoapod dependency and am working from the .workspace.
This is the podfile content:
platform :ios
pod 'Parse', '~> 1.7.2.1'
However I received the following compiler error:
Apparently I'm missing a Library.
What am I doing wrong?
Try rerunning pod update from the project folder via the command line, then cleaning your build.
Also, you don't need to be quite to specific with your podfile. Try this instead:
platform :ios
pod 'Parse', '~> 1.7'