I am starting a project by creating a blank Single-View app for Swift. Using Cocoapods, I am adding Alamofire as follows:
platform :ios, "8.0"
use_frameworks!
target 'TestGauge' do
pod 'Alamofire', '~> 3.0'
end
target 'TestGaugeTests' do
end
Then, in Terminal I run pod install
When returning to XCode, the project fails to build with 1000+ errors generated from Alamofire.
I am running XCode from the workspace file and NOT the project file.
XCode version 6.4
Has anyone had this behavior, or can anyone offer a solution? Have I missed a critical step?
Thanks!
Alamofire 3.0 is written in Swift 2.0. Xcode 6.4 does not support Swift 2.0. Change Alamofire version or update your Xcode.
Related
On xcode, I'm trying to use a pod to implement a mail API in Swift. When I try to build the framework, I get this error:
Compiling for iOS 8.0, but module 'Alamofire' has a minimum deployment target of iOS 10.0
How do I change the pod so it builds for iOS 10.0 or above?
The problem occurs due to the Alamofire has updated its library. While Evreflection has not updated for the Alamofires updated version. You need to specify the Version of Alamofire here.
Use this line in podfile to specify the version
pod 'EVReflection/Alamofire','~> 5.10.1'
pod 'Alamofire','~> 4.9.1'
Then deintegrate the pods from project and install it again.
This would solve the problem you are facing
You should up Deployment Target of your app to 10.0 in your project's settings because you can't use pods with highest iOS version than you use in the project.:
I am attempting to use the MetaWear cocoapod to connect to BLE sensors from my IOS application. Before adding this pod, I created a basic Single View Application in Xcode. I tried to compile and run it on my iPhone, and it showed up as expected.
Having done this, I did a pod init, and updated my Podfile to look as follows, as recommended in the above MetaWear cocoapod link:
platform :ios, '12.2'
target 'myProj' do
use_frameworks!
pod 'MetaWear', '~> 3.2'
end
Once I run "pod install", I get the following output:
Analyzing dependencies
Downloading dependencies
Using Bolts-Swift (1.4.0)
Using MetaWear (3.2.0)
Generating Pods project
Integrating client project
Sending stats
Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
I then open my Xcode project ( myApp.xcworkspace ), and when I try to re-build the project, I keep getting this error:
Could not build Objective-C module 'BoltsSwift'
This is also shown in the following image:
As a result, I was under the impression that maybe I should downgrade the BoltsSwift version, but specifying something lower than 1.4, seems to be ignored. For example, I added this pod:
pod 'Bolts-Swift', '~> 1.3'
And my output after running pod install, still yielded "Using Bolts-Swift (1.4.0)". So I am not too sure how to get rid of this compilation failure. Maybe downgrading BoltsSwift is not the correct course of action. What can I try? (I am using Xcode Version 10.2.1 (10E1001))
Ok, turns out that by default, XCode set my Swift compilation to 5.0 for the BoltsSwift and MetaWear pod. I changed it to Swift 4, and I was able to build.
Updating the pods compilation level might also be a good idea, as described here :
How to set the Legacy Swift Version for each Pod in Podfile Xcode 9.0 Swift 3.2 / Swift 4.0
I install SCLAlertView by using podfile.
I'm getting 300 errors on SCLAlertView.swift file.
I'm using Xcode 7.
How to resolve the problem.
Here is my podfile
platform :ios, '8.0'
target `SCLAlertView2` do
pod `SCLAlertView`
end
target `IceCreamShopTests` do
end
it generate podfile of SCLAlertView.swift but getting 300 error.
Xcode be it is latest version not work on xcode 7)
First
If you check in Branch you can find the swift 2.3 supported version of SCLAlertView
https://github.com/vikmeup/SCLAlertView-Swift/tree/swift-2.3
You can directly use instead of installing cocoapods.
Second
If you check SCLAlertView.podspec you can find the version of cocoapods then you can install that via pods by
pod 'SCLAlertView', '~> 0.6'
If you want to support xcode 7.3 and swift 2.3 other wise if you use swift 3+ then use
pod 'SCLAlertView', '~> 0.7'
Hope that information get your issue fixed.
In Xcode 8 I'm having trouble importing any Swift 2.3 or 3 framework that was added with Cocoapods into my project.
There is a public umbrella.h file, but for some reason Xcode can't find the framework when I try to #import it.
As an example, create any Objective-C project, use the following Podfile, pod install, and then try the #import. It asks me to update the code to swift 2.3 or 3 even if that code is already Swift 2.3 or Swift 3 code. I've cleaned and tried to rebuild as well.
platform :ios, '8.0'
use_frameworks!
target 'testingFrameworks' do
pod 'SwiftyJSON'
end
Did I miss a step?
I used socketIO and was having the same problem. My solution to this is:
Close project.
Delete pod files, delivered files, pod framework, workspace file (clean up project)
pod install
Reopen workspace, upgrade swift syntax if xcode ask for, build a few times.
You might need to fix something for the new swift.
I use Alamofire 3.3 with Xcode 7.1.1, installed with Cocoapods
and I have this problem a couple of time :
Cannot load underlying module for Alamofire
here it's my Podfile :
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyProject' do
pod 'Alamofire', '~> 3.0'
end
I heard about the same problem with Xcode 6.3 and it helped me to
solve the problem once by cleaning project, but this time, I tryed to
Clean Project
Clean Xcode derived data and cache
update with version 3.1 3.2 and 3.3 of Alamofire
List item
... and nothing seams to work
does someone have the same troubles ? or any solution ?
I'm not sure if this will solve it for you but usually this occurs when you are trying to include a framework that hasn't been built yet.
Have you tried Product -> Build yet?
I think it is small bug on cocoapods install
Please try again after clean and build
if still not working, turn off xcode and try again
it worked on my side
I had the same problem,uninstall pod & install again . It worked for me , hope this will be useful for others.
For Xcode 9:
Once you have installed Alamofire pod.
Step.1 you should open your project by double click on your_project_name.xcworkspace file.
Step.2 Go to project settings --> Build Phases --> Link Binary with Libraries --> Add framework "Alamofire.framework"
Thats it!!
Now you can import the module
Kill Xcode and do pod update. Open Xcode, clean and build. This should fix it.