Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"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.

like image 371
Lastmboy Avatar asked Feb 08 '18 21:02

Lastmboy


3 Answers

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.

like image 61
spijs Avatar answered Oct 09 '22 03:10

spijs


I was able to fix the problem editing the ios version line in the Podfile to match the Project target version (10.0 in this case) in Info.

  #Podfile
  platform :ios, '10.0'

enter image description here

Finally I had to run

pod update

After that, I was able to Archive my project selecting Generic iOS Device

like image 37
eharo2 Avatar answered Oct 09 '22 03:10

eharo2


In my case I had selected a Device on Xcode when archiving, choosing Generic iOS Device solved my problem.

like image 2
toupper Avatar answered Oct 09 '22 03:10

toupper