Alamofire No Such Module (CocoaPods)

后端 未结 17 1570
借酒劲吻你
借酒劲吻你 2020-12-09 15:26

Using Xcode 7

I am trying to install Alamofire in a sample project. Have used the instructions from Ray Wenderlich\'s page

Only change from above link is the

相关标签:
17条回答
  • 2020-12-09 15:59

    As for me worked to change the name of the project. Accidentally put

    ProjectNameTests

    instead of

    ProjectName

    No schemas needed if you've configured the names correctly everywhere:

    1. Check Podfile
    2. Check which project file you've launched. (The white icon should be created for "xcworkspace")
    3. Product -> Clean Build Folder
    4. Product -> Build (Now you can run in a simulator).
    5. Start from the scratch, because most of the errors always occur in a cause of humanity mistake, not developers.
    6. If you've put the wrong name for project in Podfile check "Linked Frameworks...". If so - delete this framework. The path is showed below at screenshot.

    Example of correct Podfile (Alamofire):

    'https://github.com/CocoaPods/Specs.git'
    platform :ios, '10.0'
    use_frameworks!
    
    target 'ProjectName' do
      pod 'Alamofire', '~> 4.7'
    end
    
    • ProjectName should not contain any extensions(file types).
    0 讨论(0)
  • 2020-12-09 15:59

    There is only one way to solve this issue.

    Quit Xcode.

    Delete project's temp files located at /Users/username/Library/Developer/Xcode/DerivedData

    Delete ProjectName.xcworkspace

    Delete Podfile.lock file and Pods folder Run pod install.

    Open the newly created ProjectName.xcworkspace file and build.

    credits to Dimitris Bouzikas here

    0 讨论(0)
  • 2020-12-09 16:00

    Here is what to do:

    • close your project,
    • install your pod library,
    • then install alamofire.

    After you do all things, don't open the file with extension .xcodeproj but open the file with extension .xcworkspace

    0 讨论(0)
  • 2020-12-09 16:01

    My problem was solved using these steps :

    Clean Project Goto Project > Build Setting > Framework Search Path and add

    • "$PODS_CONFIGURATION_BUILD_DIR/Alamofire" as non-recursive
    • $(inherited) as non-recursive
    • $(SRCROOT) as recursive
    0 讨论(0)
  • 2020-12-09 16:02

    Adding Alamo Fire to all of my target's build phases fixed it for me.

    0 讨论(0)
提交回复
热议问题