Home>

Projects that were running on Xcode 11.2 cannot be built on Xcode 11.2.1 and are in trouble. I get the following error:

After examining various things, it seems that there is no problem with cocoapods itself. I removed the corresponding cocoapod from the Podfile, updated the pod and tried build, but I got the same error.

module map file '/Users/xxx/Library/Developer/Xcode/DerivedData/Build/Products/Debug-iphonesimulator/Alamofire/Alamofire.modulemap' not found

Maybe it's a cache or there is a reference to this module map in the configuration file on Xcode, and I think that there is a problem, so I want to delete that configuration item.

Thank you for any other solutions.

  • Answer # 1

    I found it when I was searching for code!
    Go to Xcode project->Target->build settings and search for "Other Swift Flags".
    Then, the following suspicious description was found, so when I combined it with the Release environment, the build passed without any problems.

    $(inherited)
    -Xcc
    -fmodule-map-file = "${PODS_CONFIGURATION_BUILD_DIR} /Alamofire/Alamofire.modulemap"
    -Xcc
    -fmodule-map-file = "${PODS_CONFIGURATION_BUILD_DIR} /AlamofireImage/AlamofireImage.modulemap"
    $(inherited)
    "-D"
    "COCOAPODS"
    -DDEBUG

    After change

    $(inherited)
    "-D"
    "COCOAPODS"