Hello i have a issue trying use alamofire 1.3, i need this because my projects wasn't migrated to swift 2.0, so here is my pod file:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '7.0'
use_frameworks!
target 'AppName' do
pod 'Alamofire', '~> 1.3'
end
But always get this error:
Resolving dependencies of Podfile
[!] Unable to satisfy the following requirements:
- Alamofire (~> 1.3) required by Podfile
Any idea?
You cannot use Alamofire with CocoaPods with a deployment target of 7.0. It MUST be 8.0+. The reason for this is that Swift frameworks are not supported on iOS 7.
Related
I'm getting this error
framework not found FBSDKLoginKit for architecture x86_64
, while building IOS in react native project. Any solutions how to fix that?
Maybe try to install the login kit via Podfile :
platform :ios, '10.0'
use_frameworks!
target 'your_app' do
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod 'FBSDKShareKit'
end
CocoaPods - 1.1.1
My pod file looks like this:
target 'MyNewProject' do
pod 'XLPagerTabStrip', '~> 5.0'
pod 'AFNetworking', '~> 3.0'
end
use_frameworks!
XLPagerTabStrip library is installed with an old swift version and xcode propose me convert it up to 2.3 or 3.0. This issue is noticed with other swift libraries e.g. Reactive Cocoa
Thank you!
As mintioned in XLPagerTabStrip - Change Log:
6.0.0
Swift 3 support
So updating its pod to the latest version should let it supports Swift 3 by default.
You can add it as pod 'XLPagerTabStrip' without specifying the version number, which causes to get latest version (it's the default behavior if you are not specifying the version number).
Change: pod 'XLPagerTabStrip', '~> 5.0' to pod 'XLPagerTabStrip'
As mentioned, you should get version 6.0.0 (latest version).
Finally, your pod file should look like:
target 'MyNewProject' do
pod 'XLPagerTabStrip'
pod 'AFNetworking', '~> 3.0'
end
use_frameworks!
Recap: After making sure that the latest version of a library has been released to support -for example- Swift 3, install it without specifying the version number; Each time you'll update the podfile, it will automatically install the latest version of the pod.
For more information, you can check Podfile Syntax Reference.
Hope this helped.
Cocoapods is no longer generating all the required headers in Pods/Headers/Private and thus causing hundreds of "missing from working copy" build issues.
The issue started happening when I upgraded from:
Xcode 7
Cocoapods pre-1.0 (not sure which version I had)
OSX El Capitan
platform ios 7.0
to
Xcode 8 Beta 6
Cocoapods 1.0.1
macOS Sierra 10.12 Beta
platform ios 8.0
My "Pods/Target Support Files" folder has 35 pods, but my "Pods/Headers/Private" and "Pods/Headers/Private" have only 4 pods each.
I tried adding "$(inherited)" to my build settings and many other of the suggested fixes on stackoverflow and cocoapods' website with no success.
platform :ios, '8.0'
target 'Meow' do
use_frameworks!
pod "AFNetworking"
pod 'SCLAlertView-Objective-C'
pod "MMMaterialDesignSpinner"
pod "JMImageCache"
pod “AWSCore”
pod “AWSSNS”
pod “AWSMobileAnalytics”
pod ”SSToolkit”, '~> 2.0.0'
pod ”TTTAttributedLabel”
pod ”M13ProgressSuite”
pod ”SSKeychain”
pod 'FBSDKCoreKit'
pod 'FBSDKLoginKit'
pod "Flurry-iOS-SDK"
pod "TPKeyboardAvoiding"
pod "UITextView+Placeholder"
pod "UIReadMoreLabel"
pod "RTLabel"
pod "HexColors"
pod "Branch"
pod 'Google/Analytics'
pod 'Mixpanel'
pod 'Fabric'
pod 'Crashlytics'
target 'MeowTests' do
inherit! :search_paths
end
end
Any help is super appreciated!
Henri
After lots of digging and trial/error I figured it out. The root issue was the upgrade from Cocoapods 0.39 to 1.0+.
You can solve this by following theses steps:
Remove any build settings you're overriding by following this: Cocoapods no longer builds project after update?
Downgrade from v1.0+ to 0.39 following this: How to downgrade or install an older version of Cocoapods
Delete the Pods folder, the Pod lock file
Add this line to the top of your Podfile
source "https://github.com/CocoaPods/Old-Specs"
Run pod install
Run cmd+k in Xcode and compile.
More Resources:
http://blog.cocoapods.org/Sharding/
To me #cybermach answer is partially helpful.
The full answer is:
1- Downgrade the CocoaPods from 1.0 to 0.39 using this link:
Install old cocoapods?
2- Then use this command "pod install" to again add the private headers.
I want to use QuickBlox Api, but during the installation 'pod' an error:
[!] Unable to satisfy the following requirements:
- Quickblox-WebRTC (~> 2.0.0) required by Podfile
Where is the error?
Okay, your pod file should look like this
source 'https://github.com/CocoaPods/Specs.git'
target 'YourProjectName' do
pod 'Quickblox-WebRTC', '~> 2.0.0'
end
I just imported Alamofire into a Swift project (via cocoapods) and my build fails because of Alamofire. XCode says there are 138 errors in Alamofire.
Here is a pick of just one error (given in the Alamofire.swift file).
value of optional type String not unwrapped :
extension NSURL: URLStringConvertible {
public var URLString: String {
return absoluteString // error shows here
}
}
Most errors are "swift compiler errors"
I have tried the following :
closing and reopening XCode
pod remove repo master / pod setup / pod install
rm -rf MyProject.xcworkspace / pod install
but no success so far.
I am running the latest cocoapods pre-release (0.39.0.beta.4) and XCode 6.4
Any suggestions ?
Well, you are using Xcode 6.4, which uses Swift 1.2
Since the master branch of Alamofire now uses Swift 2.0 you'll need to update to Xcode 7
Alternatively you can supply the version '1.3.1' in your podfile, as this was the last version using Swift 1.2.
In Pod file insert Below code....It works for me.
xcode version should be 7.3+
swift should be 2.2 (In preferences-> location-> select command line tool-> xcode 7.3).
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.3'
use_frameworks!
target 'Your Target Name' do
pod 'Alamofire', '~> 3.0'
end
I hope it will work for you.
I was using Swift2.0 but i used Alamofire 1.2.2 which caused compiler problems. After i switched to Alamofire 2.0 in the Pod Files, everything worked fine.
pod 'Alamofire', '~> 2.0'