Search code examples
iosxcodebuildframeworks

"No such module" error when archiving


My Swift 4 app rebuilds and runs successfully on all simulators except for Generic iOS Device. If I try to archive it or do a rebuild on Generic iOS Device, I get a No such module error relating to one of my pod frameworks.

I tried adding the framework to Linked Frameworks and Libraries, and that removed the error, but then it fails on the next pod framework, and so on. I have tried all sorts of paths in Framework Search Paths with no luck.

Currently, the value is set to:

enter image description here

I even tried deleting the workspace, the pod lock file, and the pods folder, and then I did a pod install to rebuild everything. Again, it rebuilds clean on any simulator except the generic one. On the generic one, I get No such module on all import statements for pod frameworks.

Any suggestions appreciated, as this problem has me completely stalled, since I can't get a release out.


Solution

  • For me what fixed it was removing one line from my Podfile and rerun pod install.

    platform :ios, '11.0'
    

    I think the version of the pods was not aligned with the version of my target, causing this issue.