Cocoapods + Cannot load underlying module for 'x'

前端 未结 21 779
梦谈多话
梦谈多话 2020-12-25 09:15

I am running XCode 7, Swift 2.0, iOS 9.

I want to install Alamofire in my project using Cocoapods. I have done the following:

gem install cocoapods

相关标签:
21条回答
  • 2020-12-25 10:07

    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

    0 讨论(0)
  • 2020-12-25 10:07

    At this URL: https://github.com/Alamofire/Alamofire/issues/441

    One of the users wrote this:

    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.

    So i tried this (xcode Version 9.2 (9C40b)):

    It did work for me. Error gone now.

    Note: My pod was not Alamofire so i guess it will work for every Pod.

    0 讨论(0)
  • 2020-12-25 10:07

    Same issue for me. I solved that by removing Alamofire version in pod file.

    Pod file as

    # Uncomment this line to define a global platform for your project
    platform :ios, "8.0"
    
    # Uncomment this line if you're using Swift
    use_frameworks!
    
    target 'GettingSwift' do
     pod 'Alamofire'
    end
    
    target 'GettingSwiftTests' do
    end
    
    0 讨论(0)
提交回复
热议问题