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:
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.
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.
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'
Finally I had to run
pod update
After that, I was able to Archive my project selecting Generic iOS Device
In my case I had selected a Device on Xcode when archiving, choosing Generic iOS Device solved my problem.
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.
I kept facing the issue "No such module" while archiving the app.
I tried this approved answer 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 :
XCode -> Targets -> My App -> General :
switched iOS from 10.0 to 11.0 and then everything worked perfectly.
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
There is another case similar to the same error. when you have an Embedded Framework project with min iOS 10 (Any iOS Device arm64, arm7) while I am archiving the build of the project with min deployment version iOS 11(Any iOS Device amr64) in Xcode 12.5.1.
I have to change the min deployment version of the Embedded Framework project to iOS 11(Any iOS Device amr64) to match with my project's deployment version.
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
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.
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.
Related
I run or build an app successfully but when I archive an app, I have an error "No such module 'Kingfisher'" after I archived in Xcode 12.1.
[1]: https://i.stack.imgur.com/M9kQM.png
I made an app with min iOS 9.0.
I've tried the solution from the link "No such module" error when archiving but it didn't work. The error is just the same.
But, the answers on the link are mostly users build on iOS 10 or 11 and they said it worked.
I've tried reinstalling the pods, clearing derived data, but it doesn't work. In my Podfile uses iOS 9 like the image below.
[2]: https://i.stack.imgur.com/ujUSD.png
Should I upgrade the iOS version from iOS 9.0 to be higher?
Im not sure if it is 100% related. But it seems that Kingfisher is supporting minimum iOS version 10.
So for your question yes. I’d try to raise it.
Podspec - https://github.com/onevcat/Kingfisher/blob/master/Kingfisher.podspec
a) Go to Pods products group and select all pods framework
b) Open build settings and select Architecture section
c) Set 'Standard Architectures (arm64, armv7) - $(ARCHS_STANDARD) for Debug and Release mode
I had this kind of issue. Fixed for me. Try this.
I want to decrease the framework deployment target from iOS 10 to iOS 9. I did the fork of the library, changed deployment target of the framework TARGET (not whole project). When I build the dependency I can see in info.plist that deployment target is iOS 9 (screenshots attached) in the framework and iOS 8 in the framework's dependency. Anyway, my project where I attach those still outputs that iOS 10 is required for this framework (yes, i did clean, delete derived data, change simulator, reset xcode).
.../MyFile.swift:13:8: Module file's minimum deployment target is ios10.0 v10.0:
.../MapFramework.framework/Modules/MapFramework.swiftmodule/arm64.swiftmodule
(that's in Swift file in the line where I have import MapFramework)
The issue was happening, because by mistake, there were two copies of the same .framework in the file hierarchy. One was in Carthage folder, another one in root folder. Even though marking in Xcode -> Reveal in Finder on the framework it always shown framework in Carthage folder, somehow it was processing both of these. After removal of the framework located in root folder everything was working perfectly fine (I didn't have to change any paths or references in Xcode, what shows that Xcode all of the time was pointing to the correct version).
Seems like an Xcode bug.
I want to archive my app with selecting the Build Option "Generic iOS Device" (and i've done that a couple of times before i upgraded to Xcode 9.2) but unfortunatly it fails every time saying "No such module 'CryptoSwift'".
To make it clear, it doesn't have to do anything with SwiftyBeaver; it maybe have to do with my CocoaPods, maybe they don't like that libraries against the target. Or maybe with Xcode 9.2 itself.
To be more specific, it fails here:
import CryptoSwift //No such module 'CryptoSwift'
Whenever i select the simulator or a device (for building, not archiving), it compiles and everything works as expected.
Any suggestions?
The answere was in the first line of my cocoa pod file:
platform :ios, '11.0'
Instead of using 11.0, i changed it platform :ios, '11'.
And than i had to change the deployment target to 11.2. I don't know, what that was changed to 10.0 but those two changes did it.
So if you guys are using any minor versions of iOS in your pod file and you aren't sure, if it exists, just leave it blank!
Apparently it did cause those No such module '' errors, because the compiler wasn't able to build that frameworks in the Derived folder because it didn't know what iOS Version i wanted them to be built.
i have a problem which puzzles me a few days now and i cannot find a solution.
What i want to do is archiving an iOS app including a watchOS app in Xcode.
The normal debug build (of both iOS App and WatchOS App) works fine on real devices and simulators (note: CocoaPods included). But when i try to archive the project the following error occurs:
error:
/Users/username/Library/Developer/Xcode/DerivedData/Build/Intermediates/ArchiveIntermediates/AppName/BuildProductsPath/Release-watchos/AppNameWatch.app:
No such file or directory
I tried to clean up everything, delete the DerivedData folder, restart Xcode, delete the App from the devices, restart the Mac... but nothing solves the problem. I also tried to archive without CocoaPods integration (I removed CocoaPods from my Project completely). I also played around with the target build phases (removing the embedded watch content).
Maybe somebody has an idea...
Thanks
Steffen
I managed to solve this error, marked as PBCXCp Error, by correcting my Target Dependencies from Project->Build Phases. Here is how the Target Dependencies should look:
iOS app target
Watch app target
Watch extension target
I've accidentally added my iOS app as a target dependency to my watch extension target and that generated the error.
Hope it helps, cheers.
I am building an app with Parse as the backend and with Xcode 7.1. I am NOT using cocoa pods. My app was building on the device just fine, however when I try to run it on the simulator I get
'Parse/Parse.h' file not found
I have included Parse.framework in my project folder and my framework search path is
$(inherited) $(PROJECT_DIR)
Why is this error occurring only for the simulator and how do I go about solving it?
UPDATE: SOLVED
My project is now running on the simulator. I changed my framework search path to
$(inherited) $(PROJECT_DIR)/projectname
Then in my build phases I actually had a duplicate MessageUI.framework.
So I deleted both, re-added one, and then made sure there was no duplicates in my 'Frameworks' project folder.
After removing duplicates my project ran!
What about trying out Cocoapods?
Simple as pod "Parse" and everything should be working.
If you have an aversion to Cocoapods for some reason check to make sure that the frameworks are weakly linked.
Another SO question that may help