How to fix cocoapod .modulemap file not found

后端 未结 5 1081
Happy的楠姐
Happy的楠姐 2021-02-07 10:19

When I try to build my project, I get a compile time error saying that a \"Module map file\" for my pod cannot be found and that I am missing a \"SwiftShimes\" module.

相关标签:
5条回答
  • 2021-02-07 10:32

    I solve this issue by removing OTHER_SWIFT_FLAGS custom flag in Swift Compiler - Custom Flags

    OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -Xcc -fmodule-map-file=\"${PODS_ROOT}/modulePath/moduleName.modulemap\"";

    0 讨论(0)
  • 2021-02-07 10:33

    I had this issue too, I'm not very familiar with XCode, but I opened the .xcodeworkspace file and then clicked build, which was successful!

    0 讨论(0)
  • 2021-02-07 10:50

    I fixed this problem myself. I can tell you what I did. Not sure which steps did it exactly, but below are all steps:

    1. Copy the contents of your Podfile somewhere safe
    2. Run: pod cache clean --all
    3. Remove "Podfile"-file from the dir.
    4. Xcode: Product > Clean Build Folder
    5. Run: pod init. A new "Podfile"-file is added to the dir
    6. Start adding parts of your original Podfile to this file
    7. Run: pod install
    8. Try to build your project again

    In my case, I think the row use_frameworks! in the "Podfile" did the trick.

    Hope this help you guys out!

    0 讨论(0)
  • 2021-02-07 10:52

    In case it helps anyone else, I was able to solve this issue a different way. I was accidentally opening up my .xcproject instead of my .xcworkspace. When I opened the correct file, the error went away.

    0 讨论(0)
  • 2021-02-07 10:52

    I had this issue only when I wanted to make an archive. On the other hand, debug worked fine. After a while I noticed that min iOS version was different between my Target, Project and Podfile min iOS version. After syncing them all to same value (iOS 11) Xcode offered me Validate Project Settings - Update to recommended settings option which I accepted and I was able to archive my project.

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