Cocoapods + Cannot load underlying module for 'x'

前端 未结 21 973
梦谈多话
梦谈多话 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 09:54

    Could not load underlying module

    1. Check framework path: Build Settings -> Framework Search Paths.
    2. Make sure the path to a framework contains no space.
    3. If the path contains a variable, find the value of the variables by searching the variable name in your Build Settings.
    4. Make sure the value of the variables contains no space.
    5. If the path contains spaces, rename those directories that contain spaces.
    6. Clean and build the project.

    In summary, make sure your path contains no space. Otherwise, rename the dir that contains spaces, then clean and build your project.

    e.g. If this is your project root: /Users/handsomeboy/ios app/Fancy App/, rename the folder that has spaces. One way to get rid of the space: change 'ios app' to 'ios_app'

提交回复
热议问题