CocoaPods update is downgrading an installed pod - ios

When I run pod update, MMDrawerController is being downgraded from the currently installed version (0.5.7) to an older one (0.4.0).
Here is the contents of my Podfile:
source 'https://github.com/CocoaPods/Specs.git'
link_with 'OpenEye-Mobile', 'SecurityStar Tests'
platform :ios, '7.0'
pod 'AFNetworking', '~> 2.5.0'
pod 'MBProgressHUD', '~> 0.9'
pod 'MMDrawerController'
pod 'MMDrawerController+Storyboard', '~> 0.0.1'
pod 'UIAlertView+Blocks', '~> 0.8.1'
target :"SecurityStar Tests" do
pod 'OCMock', '~> 3.1.1'
end
I just updated the cocoapods gem from v. 0.34.4 to 0.35.0. The only change I have made to the Podfile is updating AFNetworking from 2.3.1 to 2.5.0. If I try to explicitly specify MMDrawerController as v. 0.5.7, I get a dependency error:
- `MMDrawerController (= 0.5.7)` required by `Podfile`
- `MMDrawerController (~> 0.4.0)` required by `MMDrawerController+Storyboard (0.0.1)`
What's going on here? Why is this a problem all of a sudden? Did something change in cocoapods 0.35? Is there a way I can force MMDrawerController+Storyboard to be OK with MMDrawerController (= 0.5.7)?

SOLUTION 1 is specify same range as in MMDrawerController+Storyboard
pod 'MMDrawerController', '~> 0.4.0'
SOLUTION 2 is to update MMDrawerController+Storyboard podspec so that it will use the latest version.
EXPLANATION
The problem is as it says: dependency error.
This line in a podfile means take the latest (for 04.02 is 0.5.7):
pod 'MMDrawerController'
While this one demands 'MMDrawerController+Storyboard' :
pod 'MMDrawerController+Storyboard', '~> 0.0.1'
which, in turn, specifies in it's podspec as a dependency:
s.dependency 'MMDrawerController', '~> 0.4.0'
'~> 0.4.0' means that it can use versions 0.4.0 - 0.4.9 and there is no intersection of 0.5.7 with 0.4.0 - 0.4.9.

Related

iOS cocoapods upgrade from Fabric Crashlytics to Firebase Crashlytics

I'm working with an app that has uses Fabric Crashlytics and Google Analytics v3. These are the pods included in its podfile:
pod 'PromiseKit', '~> 4.4'
pod 'CryptoSwift', '~> 0.9.0'
pod 'Kingfisher', '~> 4.7.0'
pod 'KeychainAccess', '~> 3.1.1'
pod 'Google/Analytics', '~> 3.1.0'
pod 'Cosmos', '~> 15.0.0'
pod 'Alamofire', '~> 4.7.2'
pod 'FRHyperLabel', '~> 1.0.4'
pod 'RealmSwift', '~> 4.4.0'
pod 'Realm', '~> 4.4.0'
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
pod 'Bolts', '~> 1.9.0'
pod 'FBSDKCoreKit', '~> 4.36.0'
pod 'FacebookCore', '~> 0.3.3'
pod 'CleverTap-iOS-SDK', '~> 3.7.3'
pod 'Branch', '~> 0.29.3'
pod 'TPKeyboardAvoiding', '~> 1.3.2'
pod 'Firebase', '~> 3.17.0'
pod 'GoogleTagManager' , '~> 5.0.8'
I have to update Crahslytics from Fabric to Firebase before 15/November. I would like to change the app as less as possible, so I would like to keep using Google Analytics v3, the same versions, etc...
I've changed this:
pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'
to this:
pod 'Firebase/Crashlytics'
And run a pod update but got this error:
[!] CocoaPods could not find compatible versions for pod "Firebase/Crashlytics":
In Podfile:
Firebase/Crashlytics
None of your spec sources contain a spec satisfying the dependency: `Firebase/Crashlytics`.
This is due to a conflict with pod 'Firebase', '~> 3.17.0', so I removed the specific version and the podfile now looks like this:
pod 'Firebase/Crashlytics'
pod 'PromiseKit', '~> 4.4'
pod 'CryptoSwift', '~> 0.9.0'
pod 'Kingfisher', '~> 4.7.0'
pod 'KeychainAccess', '~> 3.1.1'
pod 'Google/Analytics', '~> 3.1.0'
pod 'Cosmos', '~> 15.0.0'
pod 'Alamofire', '~> 4.7.2'
pod 'FRHyperLabel', '~> 1.0.4'
pod 'RealmSwift', '~> 4.4.0'
pod 'Realm', '~> 4.4.0'
pod 'Bolts', '~> 1.9.0'
pod 'FBSDKCoreKit', '~> 4.36.0'
pod 'FacebookCore', '~> 0.3.3'
pod 'CleverTap-iOS-SDK', '~> 3.7.3'
pod 'Branch', '~> 0.29.3'
pod 'TPKeyboardAvoiding', '~> 1.3.2'
pod 'Firebase'
pod 'GoogleTagManager' , '~> 5.0.8'
Now the pod update works fine, it gives this log:
Analyzing dependencies
Downloading dependencies
Installing Bolts 1.9.1 (was 1.9.0)
Installing Firebase 3.6.0 (was 3.17.0)
Installing Firebase 6.33.0 (was 3.17.0)
Installing FirebaseAnalytics 3.4.2 (was 3.9.0)
Installing FirebaseCore 6.10.3 (was 3.6.0)
Installing FirebaseCoreDiagnostics (1.7.0)
Installing FirebaseCrashlytics (4.6.1)
Installing FirebaseInstallations (1.7.0)
Installing FirebaseInstanceID 1.0.9 (was 1.0.10)
Installing GoogleDataTransport (7.4.0)
Installing GoogleInterchangeUtilities (1.2.2)
Installing GoogleUtilities 1.3.2
Installing GoogleUtilities 6.7.2 (was 1.3.2)
Installing PromisesObjC (1.2.10)
Installing Realm 4.4.1 (was 4.4.0)
Installing RealmSwift 4.4.1 (was 4.4.0)
Installing SDWebImage 5.9.2 (was 5.6.1)
Installing TPKeyboardAvoiding 1.3.4 (was 1.3.3)
Installing nanopb (1.30906.0)
Removing Crashlytics
Removing Fabric
Removing GoogleToolboxForMac
Generating Pods project
Integrating client project
but when I compile the app I get the following error:
googleutilities/gulloggerlevel.h file not found
This error happens because Pods/GoogleUtilities has the content of its older version (1.3.2), not the newer one (6.7.2). How is this possible?
I've tried another thing:
I've removed from the Podfile the all pods related to Firebase and GoogleAnalytics and run a pod update.
I've added pod Firebase/Analytics and run a pod update. This creates the folder Pods/GoogleUtilities with the newer content (6.7.2 version).
I've added the rest of pods related to GoogleAnalytics. This overwrites the folder Pods/GoogleUtilities with the older content (1.3.2 version), so the googleutilities/gulloggerlevel.h file is not found again.
So is this the normal behavior?
Is it possible to have in the same podfile pod Google/Analytics and pod Firebase/Crashlytics?
Have your tried pod 'Firebase/Analytics' to get Google Analytics
https://firebase.google.com/docs/crashlytics/upgrade-sdk?platform=ios&authuser=0
Fabric is phasing out
https://developers.google.com/analytics/devguides/collection/ios/v3?ver=swift

CocoaPods - Unable to find a specification for

My Podfile looks like this:
source 'https://github.com/CocoaPods/Specs.git'
--source= 'git#bitbucket.org:appstrakt/apps-tool-libraries-appletech-specs-private.git'
--source= 'git#bitbucket.org:appstrakt/apps-tool-libraries-appletech-specs-test.git'
target 'Test' do
platform :ios, '8.0'
use_frameworks!
# Fabric
pod 'Fabric'
pod 'Crashlytics'
# Appstrakt Pods
pod 'NovemberFiveApplication-iOS', '~> 2.0'
pod 'Dye', '~> 2.0'
pod 'APGoogleAnalytics', '~> 2.0'
pod 'APCrashlyticsAnalytics', '~> 2.0'
pod 'APLoggerServiceBasic', '~> 2.0'
# Dexter
pod 'Dexter', '~> 0.0.1'
pod 'DEXHTTPMonitorModule', '~> 0.0.1'
# 3rd Party Pods
pod 'JVFloatLabeledTextField', '~> 1.1'
pod 'Lockbox', '~> 1.4'
pod 'UICollectionViewLeftAlignedLayout'
pod 'Reveal-SDK'
end
post_install do |installer_representation|
installer_representation.pods_project.targets.each do |target|
When I run 'pod install', I got an error:
Analyzing dependencies [!] Unable to find a specification for
NovemberFiveApplication-iOS (~> 2.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.
NovemberFiveApplication-iOS is not a public CocoaPod. To install it you will need to add the repo: https://guides.cocoapods.org/making/private-cocoapods.html
November Five seem to be a business, with no open source repo. To use their SDK you will need to get the repo from them.

Getting error after pod update to FBSDK 5.0.0 in x code 10.1

I am trying to update my facebook SDK to 5.0.0 but after installing pod update, I keep getting this error in FBSDK Login Kit.
This is my pod file.
pod 'FacebookSDK', '~> 5.0.0'
pod 'FacebookSDK/LoginKit', '~> 5.0.0'
pod 'FacebookSDK/ShareKit', '~> 5.0.0'
pod 'FacebookSDK/PlacesKit', '~> 5.0.0'
pod 'FBSDKLoginKit', '~> 5.0.0'
Anyone please help me to solve this problem.
Now I got solution.
First I install FBSDK kits for version 5.0.2 like
pod 'FBSDKLoginKit', '~> 5.0.2'
pod 'FBSDKCoreKit', '~> 5.0.2'
pod 'FBSDKShareKit', '~> 5.0.2'
After you would see
Bolt.h file not found
Remove that import bolt.h line, and replace
[FBSDKBasicUtility objectForJSONString ...]
with
[FBSDKInternalUtility objectForJSONString ...].
When you are done change some codes that they suggest to current FBSDK version acceptable codes and it solved.
You have getting wrong way. Sometimes pod is updated but some files may not get updated. So, you need to first uninstall FBSDK pod by removing
pod 'FacebookSDK', '~> 5.0.0'
pod 'FacebookSDK/LoginKit', '~> 5.0.0'
pod 'FacebookSDK/ShareKit', '~> 5.0.0'
pod 'FacebookSDK/PlacesKit', '~> 5.0.0'
pod 'FBSDKLoginKit', '~> 5.0.0'
from pod file, and then run following command. You can also comment above pod and run command.
pod install
This will clear your old pod files.
Again, add above pods in pod file and run same command
pod install
will fix your issues.

Unable to find a specification for `ARCore (~> 1.2.1)

I'm trying to compile and build the ARCore example provided here :
https://github.com/google-ar/arcore-ios-sdk
My Podfile looks as follows
`=> cat Podfile
target 'MyTarget'
platform :ios, '11.0'
pod 'ARCore', '~> 1.2.1'
pod 'Firebase/Core', '~> 4.11'
pod 'Firebase/Database', '~> 4.11'`
When I run pod install, I get the folllowing error :
==> pod install
Analyzing dependencies
[!] Unable to find a specification forARCore (~> 1.2.1)``
Run pod update or pod install --repo-update.
Your podspec repo is probably does not include 1.2.1 yet.

Unable to find host target(s) for Extension

Report
What did you do?
I tried to run the pod install command
What did you expect to happen?
Install all pod dependencies correctly like the 1.1.1 version do.
What happened instead?
[!] Unable to find host target(s) for myExtension1, myExtension2. Please add the host targets for the embedded targets to the Podfile.
Certain kinds of targets require a host target. A host target is a "parent" target which embeds a "child" target. These are example types of targets that need a host target:
- Framework
- App Extension
- Watch OS 1 Extension
- Messages Extension (except when used with a Messages Application)
CocoaPods Environment
Stack
CocoaPods : 1.2.1
Ruby : ruby 2.2.5p319 (2016-04-26 revision 54774) [x86_64-darwin15]
RubyGems : 2.4.5.1
Host : Mac OS X 10.12.5 (16F73)
Xcode : 8.3.3 (8E3004b)
Git : git version 2.13.0
Ruby lib dir : /Users/dogo/.rbenv/versions/2.2.5/lib
Repositories : master - https://github.com/CocoaPods/Specs.git # 08682dc5b65d664048f43d7886a018856c692b63
Installation Source
Executable Path: /Users/dogo/.rbenv/versions/2.2.5/bin/pod
Plugins
claide-plugins : 0.9.2
cocoapods-deintegrate : 1.0.1
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.0.0
cocoapods-trunk : 1.2.0
cocoapods-try : 1.1.0
slather : 2.4.2
Podfile
source 'https://github.com/CocoaPods/Specs.git'
project 'MyProject', 'DebugProduction' => :release , 'Integrated' => :release , 'Mock' => :release, 'DebugMock' => :debug
platform :ios, '8.0'
inhibit_all_warnings!
def all_pods
pod 'AFNetworkActivityLogger'
pod 'AFNetworking'
pod 'AMPopTip', '~> 1.0.0'
pod 'BBBadgeBarButtonItem', '~> 1.2'
pod 'Bricks', '~> 0.1.2'
pod 'bricks-Mantle', '~> 0.1.0'
pod 'CocoaLumberjack', '~> 2.2.0'
pod 'Crashlytics'
pod 'CustomIOSAlertView'
pod 'Fabric'
pod 'FBSDKCoreKit', '4.16.0'
pod 'FBSDKLoginKit', '4.16.0'
pod 'FBSDKShareKit', '4.16.0'
pod 'FDKeychain', '~> 1.0.0'
pod 'FSCalendar'
pod 'GoogleAnalytics', '~> 3.17.0'
pod 'GoogleConversionTracking', '~> 3.4.0'
pod 'GoogleMaps', '2.3.1'
pod 'HockeySDK', '4.1.6'
pod 'JVFloatLabeledTextField'
pod 'LGPlusButtonsView'
pod 'MaryPopin', '1.4.2'
pod 'MBProgressHUD'
pod 'MGSwipeTableCell'
pod 'MMWHaleImageCropper', '~> 0.1'
pod 'NSStringMask', '1.2'
pod 'ObjectiveSugar', '~> 1.1.0'
pod 'PromiseKit', '~> 1.7.0'
pod 'Realm', '~> 2.3.0'
pod 'REFrostedViewController', '~> 2.4'
pod 'RegExCategories', '~> 1.0'
pod 'SMXMLDocument', '~> 1.1'
pod 'SpotlightHandler', :git => 'https://github.com/renatosarro/SpotlightHandler'
pod 'SRMonthPicker', '~> 0.2.10'
pod 'TLInputsChainHelper', :git => 'https://github.com/thiagolioy/TLInputsChainHelper.git'
pod 'TLJsonFactory'
pod 'UITintedButton'
pod 'XMLDictionary', '1.4'
pod 'ZBarSDK'
pod 'ZSWTaggedString', '~> 1.1'
pod 'ZSWTappableLabel', '1.3'
end
target :MyProject do
all_pods
end
target :'MyProject-cal' do
all_pods
end
target :MyProjectExtension do
pod 'GoogleAnalytics', '~> 3.17.0'
end
target :MyProject2 do
all_pods
end
target :'MyProject2-cal' do
all_pods
end
target :MyProjectExtension2 do
pod 'GoogleAnalytics', '~> 3.17.0'
end
target :MyProjectTests do
inherit! :search_paths
pod 'Expecta'
pod 'OCMock'
pod 'Specta', '1.0.5'
pod 'TLJsonFactory'
end
The problem is not in the podfile, but in the project!
To fix:
Go to XCode
Select your HOST target.
Open the target's 'General' page
In the 'Embedded Binaries' section, make sure your EXTENSION target is present.
In your Podfile you should have:
target 'HostApp' do
....
target 'YourExtension' do
....
end
end
This happened to me because I had a target for an extension that was de-activated (removed as a dependency for the main target) in my Podfile.
Removing the target fixed it.
For me to solve he issue I had to remove the appex of the extension from the host app's Embedded binaries and add it again (because the issue happened after solving merge conflicts)
Then I ran "pod install", and it worked
you have to add extension to both Build Phases -> Dependencies and Build Phases -> Embed App Extensions for you Main app target

Resources