Unable to successfully use/import Alamofire. Xcode 6.3 with a clean project and cocoapods install.
Cannot reproduce. Try cleaning your project or re-installing from CocoaPods.
If you continue to experience problems and think that this might be an issue with CocoaPods, please open an issue with them. Otherwise, please ask a question on Stack Overflow with the "Alamofire" tag.
Clean did not work, re-installing from pods did not work, installing from carthage did not work, manual install did not work. I finally got it to work after Build for Testing.
Hi @n2b8,
This is working properly for the majority of us. Here's a few tips that maybe will help. Otherwise please open a ticket on StackOverflow and we can further assist there. That will also give the question and answer more visibility to the rest of the community.
Xcode Version
CocoaPods Version
cnoon:~$ pod --version
0.36.4
Podfile
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 1.2'
Import Alamofire in New Project
Build Project
If none of these end up solving your issue, then please open a question on StackOverflow and post a link to the question here. I'll continue to help you debug the issue further if necessary.
Cheers.
I had the same problem after installing from cocoapods.
Choosing Product | Clean then Product | Build fixed it.
Had the same problem after installing from cocoapods. Product/Clean didn't help. Shutting down Xcode and reopening the workspace did help.
I also have that issue. It wouldn't affect build the project but very annoying. And I think it only happens when you use cocoapod to add Alamofire to the existing project which is not init with cocoapod.
None of the above helped, opened Stack Overflow issue as recomended.
http://stackoverflow.com/questions/31674885/cannot-load-underlying-module-for-alamofire
This solved it for me:
Follow up: Updating to xcode 7.0 and https://github.com/Alamofire/Alamofire/issues/122, solved it for me.
Xcode 7.0.1 and #122 solved for me as well.
Xcode 7.1 and #122 solved it for me as well.
All I had to do was comment out the import Alamofire
and run the app; then uncomment it.
xcode 7.1 , build the project once before using the framework works.
Xcode 7.1, after install Alamofire with cocoapods, clean your project and rebuild. It works.
I did this:
While installing pod this warning message was shown:
[!] The Confidential
target overrides the EMBEDDED_CONTENT_CONTAINS_SWIFT
build setting defined in `Pods/Target Support Files/Pods-Confidential/Pods-Confidential.release.xcconfig'. This can lead to problems with the CocoaPods installation
And then I did this:
Go to your target Build Settings -> Other linker flags -> double click . Add $(inherited) to a new line.
Proplem solved
build for testing worked to get rid of the error for me.
I had this problem and couldn't figure it out until I dropped the iOS module from 9.1 down to 8.0 and it then told me that "Alamofire module requires iOS 9.2". Changed the project up to 9.2 and it now builds correctly.
I had this issue with the beta version of pod. My issue was fixed once I went to a stable release.
I tried ios9.3. I am not getting this to work.
Having issue here :(
Anyone know what's happening?
@georgeportillo That's the exact same issue I have right now. I am using Xcode7.2.1 Swift 2.1
21 issues
@georgeportillo My guess was right, but it took me a while to find out.
Version 3.3.1 requires Swift 2.2 https://github.com/Alamofire/Alamofire/issues/1169
@georgeportillo I got the same the same list of 21 errors. Here's what I did to get rid of the errors.
pod 'Alamofire', '2.0.2'
pod install
on the terminalimport Alamofire
as mentioned in #122. The project built successfully. Then rebuilt after importing Alamofire.I tried this and it didn't work for me. The 21 errors are gone but I still
get No such Module 'Alamofire'.
David Decker
weatherUSA, LLC
Meteorologist M.S./ Developer
Columbus, OH 43228
Cell: 419-680-3598
On Fri, Apr 22, 2016 at 12:29 PM, atulsha [email protected] wrote:
@georgeportillo https://github.com/georgeportillo I got the same the
same list of 21 errors. Here's what I did to get rid of the errors.
- In the Podfile, I changed the Alamofire version to 2.0.2 (earlier I
had installed 3.3.1)
pod 'Alamofire', '2.0.2'- Re-installed this version of Alamofire by running pod install on the
terminal- Then, built the project _without_ adding import Alamofire as
mentioned in #122 https://github.com/Alamofire/Alamofire/issues/122.
The project built successfully. Then rebuilt after importing Alamofire.
Before building I also made sure that the deployment target is 8.0 (as was
mentioned in my Podfile).—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/Alamofire/Alamofire/issues/441#issuecomment-213499587
@atulsha That is not a valid solution to this problem. Using an older, unsupported version of Alamofire is not a good idea. Alamofire 3.3 requires Xcode 7.3. @deck2osuab Try a cleaning your build environment after updating Alamofire and Xcode to the latest versions.
Now I am getting the same problem but with SwiftyJSON. Alamofire issue was
fixed.
David Decker
weatherUSA, LLC
Meteorologist M.S./ Developer
Columbus, OH 43228
Cell: 419-680-3598
On Fri, Apr 22, 2016 at 2:06 PM, Jon Shier [email protected] wrote:
@atulsha https://github.com/atulsha That is not a valid solution to
this problem. Using an older, unsupported version of Alamofire is not a
good idea. Alamofire 3.3 requires Xcode 7.3. @deck2osuab
https://github.com/deck2osuab Try a cleaning your build environment
after updating Alamofire and Xcode to the latest versions.—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Alamofire/Alamofire/issues/441#issuecomment-213533711
i can import 3.3.1 but not 3.4
i faced that issue, and i solved it by manually add the alamofire framework into to project
i get this issue today. No way to use this framwork on my project?
adding my team worked for me!
Encounter the same error. The answer is simple.Before you import Alamofire into the module,cmd +R the app.Plus,when you are not sure what the version of Alamofire is, just write: pod 'Alamofire' in the podfile,without the version number, and the cocoapod will know it is the newest version.
Same issue for me with AF 3.1.0 and XCode 8
Same issue:
Xcode 8.1 (8B62)
Cocoapods: 1.1.1
It successfully solved my issue by following the instructions at
http://stackoverflow.com/a/40360050/1804274
I didn't reinstall the pod but just running the app with the error on import, no other calls to alamofire. It run and removed the error: Cannot load underlying module for 'Alamofire'
why@#!@$!$#@$@!#@
Ok, I managed to get rid of the error by running the app without writing import Alamofire
, then writing it.
I'm having the same issue with Appcode. But it doesn't go away as in XCode when I run the project.
I have just tried the Carthage. Everything works for me. "just works". Carthage does not change your project. I didn't know that before.
Carthage does not work for me, CocoaPods did. thanks everyone for suggestions
Most helpful comment
Clean did not work, re-installing from pods did not work, installing from carthage did not work, manual install did not work. I finally got it to work after Build for Testing.