Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot load underlying module for 'Alamofire' #441

Closed
n2b8 opened this Issue Apr 21, 2015 · 39 comments

Comments

Projects
None yet
@n2b8
Copy link

n2b8 commented Apr 21, 2015

Unable to successfully use/import Alamofire. Xcode 6.3 with a clean project and cocoapods install.
screen shot 2015-04-21 at 2 40 00 am

@mattt

This comment has been minimized.

Copy link
Contributor

mattt commented Apr 21, 2015

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.

@mattt mattt closed this Apr 21, 2015

@n2b8

This comment has been minimized.

Copy link
Author

n2b8 commented Apr 21, 2015

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.

@cnoon

This comment has been minimized.

Copy link
Member

cnoon commented Apr 21, 2015

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

screen shot 2015-04-21 at 8 02 09 am

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

screen shot 2015-04-21 at 8 03 13 am

Build Project

screen shot 2015-04-21 at 8 03 30 am


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.

@thunderkid

This comment has been minimized.

Copy link

thunderkid commented Apr 27, 2015

I had the same problem after installing from cocoapods.
Choosing Product | Clean then Product | Build fixed it.

@sundraw

This comment has been minimized.

Copy link

sundraw commented May 29, 2015

Had the same problem after installing from cocoapods. Product/Clean didn't help. Shutting down Xcode and reopening the workspace did help.

@Samyro

This comment has been minimized.

Copy link

Samyro commented Jun 1, 2015

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.

@Struki84

This comment has been minimized.

Copy link

Struki84 commented Jul 28, 2015

None of the above helped, opened Stack Overflow issue as recomended.
http://stackoverflow.com/questions/31674885/cannot-load-underlying-module-for-alamofire

@pori

This comment has been minimized.

Copy link

pori commented Aug 1, 2015

This solved it for me:

#122

@Struki84

This comment has been minimized.

Copy link

Struki84 commented Sep 29, 2015

Follow up: Updating to xcode 7.0 and #122, solved it for me.

@FelipeUmpierre

This comment has been minimized.

Copy link

FelipeUmpierre commented Oct 16, 2015

Xcode 7.0.1 and #122 solved for me as well.

@dotmike

This comment has been minimized.

Copy link

dotmike commented Oct 24, 2015

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.

@azureland

This comment has been minimized.

Copy link

azureland commented Nov 3, 2015

xcode 7.1 , build the project once before using the framework works.

@jefferyleo

This comment has been minimized.

Copy link

jefferyleo commented Nov 17, 2015

Xcode 7.1, after install Alamofire with cocoapods, clean your project and rebuild. It works.

@PrajeetShrestha

This comment has been minimized.

Copy link

PrajeetShrestha commented Jan 14, 2016

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

@Tkizzy

This comment has been minimized.

Copy link

Tkizzy commented Jan 27, 2016

build for testing worked to get rid of the error for me.

@JordanOneU

This comment has been minimized.

Copy link

JordanOneU commented Jan 28, 2016

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.

@adenix

This comment has been minimized.

Copy link

adenix commented Apr 15, 2016

I had this issue with the beta version of pod. My issue was fixed once I went to a stable release.

@deck2osuab

This comment has been minimized.

Copy link

deck2osuab commented Apr 19, 2016

I tried ios9.3. I am not getting this to work.

@georgeportillo

This comment has been minimized.

Copy link

georgeportillo commented Apr 20, 2016

screen shot 2016-04-19 at 10 30 14 pm

Having issue here :(

Anyone know what's happening?

@ZeranLatte

This comment has been minimized.

Copy link

ZeranLatte commented Apr 21, 2016

@georgeportillo That's the exact same issue I have right now. I am using Xcode7.2.1 Swift 2.1
21 issues

@ZeranLatte

This comment has been minimized.

Copy link

ZeranLatte commented Apr 22, 2016

@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

@atulsha

This comment has been minimized.

Copy link

atulsha commented Apr 22, 2016

@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. 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).
@deck2osuab

This comment has been minimized.

Copy link

deck2osuab commented Apr 22, 2016

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 notifications@github.com 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 #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
#441 (comment)

@jshier

This comment has been minimized.

Copy link
Contributor

jshier commented Apr 22, 2016

@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.

@deck2osuab

This comment has been minimized.

Copy link

deck2osuab commented Apr 22, 2016

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 notifications@github.com 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
#441 (comment)

@elazaron

This comment has been minimized.

Copy link

elazaron commented May 18, 2016

i can import 3.3.1 but not 3.4

@ccastera

This comment has been minimized.

Copy link

ccastera commented May 30, 2016

i faced that issue, and i solved it by manually add the alamofire framework into to project

@thuutien

This comment has been minimized.

Copy link

thuutien commented Jun 2, 2016

i get this issue today. No way to use this framwork on my project?

@Simeon-O

This comment has been minimized.

Copy link

Simeon-O commented Aug 15, 2016

adding my team worked for me!

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 26, 2016

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.

@newmanw

This comment has been minimized.

Copy link

newmanw commented Sep 28, 2016

Same issue for me with AF 3.1.0 and XCode 8

@SeanNieuwoudt

This comment has been minimized.

Copy link

SeanNieuwoudt commented Oct 31, 2016

Same issue:
Xcode 8.1 (8B62)
Cocoapods: 1.1.1

@devbuds

This comment has been minimized.

Copy link

devbuds commented Nov 1, 2016

It successfully solved my issue by following the instructions at
http://stackoverflow.com/a/40360050/1804274

@ardee19

This comment has been minimized.

Copy link

ardee19 commented Nov 7, 2016

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'

@rolf-fox rolf-fox referenced this issue Aug 2, 2017

Closed

Xcode 9 Support #49

@martianmartian

This comment has been minimized.

Copy link

martianmartian commented Oct 11, 2017

why@#!@$!$#@$@!#@

@Paydayzcool

This comment has been minimized.

Copy link

Paydayzcool commented Oct 18, 2017

Ok, I managed to get rid of the error by running the app without writing import Alamofire, then writing it.

@ghost

This comment has been minimized.

Copy link

ghost commented Oct 29, 2017

I'm having the same issue with Appcode. But it doesn't go away as in XCode when I run the project.

@kadze

This comment has been minimized.

Copy link

kadze commented Oct 30, 2017

I have just tried the Carthage. Everything works for me. "just works". Carthage does not change your project. I didn't know that before.

@jafara

This comment has been minimized.

Copy link

jafara commented Apr 19, 2018

Carthage does not work for me, CocoaPods did. thanks everyone for suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.