missing required module 'SwiftShims' error generated by Xcode in project

后端 未结 8 1697
一生所求
一生所求 2020-12-16 12:59

I copied my project in a running state but the copied project doesn\'t work for me although the actual project is running fine. When I build my copied project it gives me th

相关标签:
8条回答
  • 2020-12-16 13:30

    I had the same error, but the reason turned out to be having different iOS versions specified as Podfile's platform :ios and as my project's deployment target.

    0 讨论(0)
  • 2020-12-16 13:31

    If you're working with SPM, deleting the .build folder and re-running swift build solves the issue for me.

    0 讨论(0)
  • 2020-12-16 13:31

    I have once encountered for a private local pod, which somehow Cocoapod set the lib product name as eg. "MyLib-6c4b1003" -- with a prefix in hex.

    This random hex somehow changed, but the project Other Link Flags still using the old one. I did the search to find out the references to the old hex and deleted them, run pod install and the right name will be used.

    I still cannot understand why there is this random hex in the prefix, but seems like Cocoapods setting up of the project could reference to the wrong one.

    0 讨论(0)
  • 2020-12-16 13:34

    Did you try to remove the cache ?

    rm -rf /Users/abdulrehman/Desktop/StudentMentor/DerivedData/ModuleCache/DLJPQMLQI1Q/
    

    (I might have wrong copied your file path. So feel free to type it manually if there is nothing to remove at this path)

    0 讨论(0)
  • 2020-12-16 13:35

    SwiftShims is a module defined in the standard library. It shouldn't be missing. I think it's because your DerivedData path changed, and now the compiler can't find its cache anymore.

    0 讨论(0)
  • 2020-12-16 13:38
    • Goto your project folder
    • Delete the contents inside the DerivedDataXcode folder.
    • Clean the project
    • Run.
    0 讨论(0)
提交回复
热议问题