Headers are not found after updating CocoaPods - ios

I updated CocoaPods today (sudo gem install cocoapods). After performing pod install the project won't compile anymore. It seems that headers from the pod are not longer found by the project.
Did something change in the recent cocoa pods version(s)?
The following is my pod file:
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
pod 'CocoaLumberjack'
pod 'RestKit', '~> 0.20.0'
pod 'RestKit/Testing'
pod 'NLTHTTPStubServer'
pod 'Appsee'
pod 'google-plus-ios-sdk', '1.7.0'

Fix is simple and the error tells what to do. Add this to the top of your Podfile:
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
Here's the Github issue with more details - https://github.com/CocoaPods/CocoaPods/issues/2515
Update
Make sure you create the Podfile in the root of your Xcode project directory. Here's what your Podfile should look like -
source 'https://github.com/artsy/Specs.git'
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
inhibit_all_warnings!
# Pods
pod 'RestKit', :head
pod 'RestKit/Testing', :head
pod 'CocoaLumberjack', :head
pod 'NLTHTTPStubServer', :head
pod 'Appsee', '~> 2.1'
pod 'google-plus-ios-sdk', '~> 1.7.0'
In your terminal -
Update RubyGems - sudo gem update
Update Cocoa Pods - sudo gem install cocoapods
In your project directory -
Remove pods - rm -rf Pods/
Install pods - pod install

I was in the same position as you, and finally decided to roll back the CocoaPods version I had installed (which solved my problem)
Luckily my Podfile.lock file was under version control, so I pulled up the file to see what the last version of Cocoapods I had used. The last line of my Podfile.lock was:
COCOAPODS: 0.33.1
So here is how I solved my issue
sudo gem uninstall cocoapods
sudo gem install cocoapods -v 0.33.1
rm -rf Pods
pod install

Related

Dependency analysis error after installing a new pod

Currently I'm using Swift 3, and after I install a new Pod I received this error
Here's my Pod
I can't even clean the project, I tried Pod update but the error persists. What should I do to fix this problem?
Must Add line
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'Bolts', '~> 1.8'
pod 'Cosmos', '~> 12.0'
end
Now you can install the dependencies in your project:
$ pod install

Cocoapods is installing old Pod version

I'm using RxSwift and other Rx-pods in my app, according to my Podfile.lock I use RxSwift (3.2.0), but now I want to update the Pods to the latest versions.
So I remove the 4 Rx..-pods that I use from my Podfile, and run pod install, this removed the pods from the project and the Podfile.lock. The I re-add the 4 Rx..-pods and run pod instalagain. This installs RxSwift 2.6.1... Why? - I'm expecting it to install the newest stable version of RxSwift, something like 3.6.1..
I tried removing everything listed by: gem list --local | grep cocoapods and reinstalling cocoapods by running: gem install cocoapods
I also tried running pod repo update without success.
I also tried just running pod update, without uninstalling the Pods first, also same outcome.
I suspect this to be an issue with my cocoapods-gem, not The Rx-pods..
Edit added Podfile:
source 'https://github.com/CocoaPods/Specs.git'
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'MyApp' do
pod 'BrightFutures'
pod 'Alamofire'
pod 'MBProgressHUD'
pod 'Fabric'
pod 'Crashlytics'
pod 'Analytics', '~> 3.0'
pod 'SwiftyJSON'
pod 'Eureka', '~> 2.0.0-beta.1'
pod 'RxCocoa'
pod 'RxSwift'
pod 'INTULocationManager'
pod 'ReachabilitySwift', '~> 3'
pod 'RxSwiftExt'
pod 'RxMKMapView'
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
Edit Added pod outdateddump:
Analyzing dependencies
The following pod updates are available:
- Alamofire 4.3.0 -> 4.5.0 (latest version 4.5.0)
- Analytics 3.5.7 -> 3.6.4 (latest version 3.6.4)
- BrightFutures 5.1.0 -> 5.2.0 (latest version 6.0.0-beta.1)
- Crashlytics 3.8.3 -> 3.8.5 (latest version 3.8.5)
- Eureka 2.0.0-beta.1 -> 2.0.1 (latest version 3.1.0)
- Fabric 1.6.11 -> 1.6.12 (latest version 1.6.12)
- Result 3.1.0 -> 3.2.3 (latest version 3.2.3)
- RxCocoa 3.2.0 -> 3.6.1 (latest version 3.6.1)
- RxSwift 3.2.0 -> 3.6.1 (latest version 3.6.1)
You could try the following:
Clearing CocoaPods' cache:
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/" (while in your project's dir)
Finally pod update
If you are using 0.38.0.beta1, you can just use pod cache clean
Regenerate everything:
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate; pod setup; pod install
Set the version
pod 'RxSwift', '~> 3.0' # last version is 3.6.1
The latest release of RxMKMapView needs RxCocoa 2.x.x. Apparently they need to update the Podspec, to allow RxCocoa 3.x.x. They did this in a commit, but it was never uploaded to cocoapods (or however that works). So I solved the problem by getting the pod from that commit. Because the pod RxCocoadidn’t have a minimum version requirement, cocoapods would just get latest version of RxCocoa that satisfied pod RxMKMapView, which was an old version (2.x.x). This was why I though something was wrong with my Cocoapod install, turns out it’s important to declare minimum versions of the wanted pods.. This solved the problem:
pod ‘RxCocoa’, ‘~> 3’
pod ‘RxSwift’, ‘~> 3’
pod ‘RxMKMapView’, :git => ‘https://github.com/RxSwiftCommunity/RxMKMapView.git', :commit => ‘6b86c6a’

Installing CocoaPods and AWS Mobile iOS SDK

I followed these instructions: http://docs.aws.amazon.com/mobile/sdkforios/developerguide/install-ios-sdk.html
But I still get all these missing dependencies: http://screencast.com/t/o2oaYFctzg
How do I fix this?
So I had issues with this for a while too. A bit confusing if it is your first dependency manager.
So open up terminal and follow these steps:
gem --help to check if you have RubyGems. If not go HERE
sudo gem install cocoapods IT TAKES A WHILE, be patient, it will go
Now, once that's done, cd into your directory where your .xcodeproj is
Create your Podfile: nano Podfile NO extension
Include your packages pod 'AFNetworking', '~> 2.0' for instance
And all your AWS packages:
source 'https://github.com/CocoaPods/Specs.git'
pod 'AWSCore'
pod 'AWSAutoScaling'
pod 'AWSCloudWatch'
pod 'AWSDynamoDB'
pod 'AWSEC2'
pod 'AWSElasticLoadBalancing'
pod 'AWSKinesis'
pod 'AWSLambda'
pod 'AWSMachineLearning'
pod 'AWSMobileAnalytics'
pod 'AWSS3'
pod 'AWSSES'
pod 'AWSSimpleDB'
pod 'AWSSNS'
pod 'AWSSQS'
pod 'AWSCognito'
Exit and save from nano CTRL+X
pod install
Open your .xcworkspace

Unable to find a specification for any Pods after running pod setup

For every pod I try to install, I'm getting the 'unable to find a spec'error.
Here is my podfile:
source 'https://github.com/yannickl/QRCodeReader.swift.git'
source 'https://github.com/aschuch/QRCode.git'
platform :ios, '8.0'
pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'
After testing a few times with various changes to the Podfile, I have run:
sudo rm -fr ~/.cocoapods/repos/master
pod setup
However that didn't solve it. I'm running El Capitan / XCode 7. Anyone else running into a similar problem?
I would replace the source with CocoaPods specs since both the dependencies are added to the master spec repo.
source 'https://github.com/CocoaPods/Specs.git'
Also you need to add use_frameworks! since one of your pod is written in swift.
Refer this: https://github.com/yannickl/QRCodeReader.swift
So your podfile will look like this
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'QRCode', '0.2'
pod 'QRCodeReader.swift', '~> 4.3.0'

CocoaPods not working

I installed CocoaPods on a new machine.
My podfile file is just like this :
platform :ios, '6.0'
pod 'MBProgressHUD', '~> 0.8'
But when I run pod install
Unable to find a specification for `MBProgressHUD (= 0.8)`.
I tried reinstalling CocoaPods, but didn't help.
Try this:
xcode-select --switch /applications/Xcode.app
pod setup
pod install
Cocoapods - Unable to find a Specification for [Github framework]

Resources