Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 230 Vote(s) - 3.46 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"No such module" error when archiving

#1
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][1]][1]

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.


[1]:
Reply

#2
first build your project ```command + b``` and see if the frameworks are in red when you look at then at the right sidebar, if they are, xcode did not find your files on the specified path, if not, building and then archiving should work
Reply

#3
I was able to get it to archive by re-creating the project from scratch. I created a new project, used the same pod file to install the pod libraries, then copied everything over from the other project. I am now able to archive it and push it to the store. Must have been some corruption or a rogue setting.
Reply

#4
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][1]][1]

Finally I had to run

pod update

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

[1]:

Reply

#5
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.
Reply

#6
It's better to check the project settings by going to **Build Settings**, find **Framework Search Paths** and add `$(SRCROOT)` and be sure it's recursive.
Reply

#7
In my case, the module which couldn't be found was a dynamic Obj-C framework with a minimum deployment target higher than my application project's minimum deployment target. Bumping my minimum version fixed it, but you could drop the version on the framework instead.
Reply

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

#9
I kept facing the issue "No such module" while archiving the app.

I tried this [approved answer][1] and it worked perfectly but, a new warning was appearing in my Podifle.


So I did the below and it worked without any warning.

Podfile :

[![enter image description here][2]][2]

XCode -> Targets -> My App -> General :

[![enter image description here][3]][3]


switched iOS from 10.0 to 11.0 and then everything worked perfectly.


[1]:

[To see links please register here]

[2]:

[3]:
Reply

#10
Seems like by opening up the project by double clicking `Runner.xcworkspace` instead of `Runner.xcodeproj`, xcode can finally figure out where everything is. Even though you can still debug in an emulator and on a connected phone from the `.xcodeproj` file...

Seems strange that it would fix it. But I'm happy to have an Archived build now.

[Check out this link for more info][1]


[1]:

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through