RealmSwift: No such module 'RealmSwift'
It looks like you've added the path to RealmSwift.framework
to your framework search paths. The Realm Swift installation instructions say to add the parent path of RealmSwift.framework
(i.e., the containing directory) to your framework search paths.
Why do I keep getting the error no such module 'realmswift'?
Best way to resolve this issue is follow these steps
1) click on project or in product in xcode then click on manage scheme
2) after uncheck your project and check your pod u have installed
3) Build your application with your pod
4) After again change your scheme and uncheck pod and check your app this will works , i added images to explain this :)
Build like this
No such module RealmSwift
This is more of a troubleshooting step than a direct answer since I duplicated your issue.
You've been using Realm a while so you know this but for future readers, ensure that any file where you're using RealmSwift includes
import RealmSwift
I just tried your podfile on a new project and am getting weird behavior as well. I replaced your podfile with the following 5 lines and it works correctly.
project 'Realm Test.xcodeproj'
target 'Realm Test' do
use_frameworks!
platform :osx, '10.13'
pod 'RealmSwift'
end
That was a macOS project but it worked equally well with an iOS project. On that project I uncommented #platform :ios, '12.0'
I think this is the issue
inherit! :search_paths
That lets the target know about the search paths but does not link them in. I would suggest changing that to
inherit! :complete
Which appears to be working in my project.
Oh - for completness, I ran into this once as well and the solution was
add the parent path of RealmSwift.framework (i.e., the containing
directory) to your framework search paths.
No such module error in Xcode 12.4 Apple M1
Adding this to podfile helps me
post_install do |installer|
installer.pods_project.build_configurations.each do |config|
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
Getting 'no such module' error when importing a Swift Package Manager dependency
It turned out that Swift Package Manager implicitly depends on the project's Configuration names. I had them at live/qa instead of Release/Debug, and changing them back resolved the issue. Very odd, but I hope it saves you some trouble dear reader.
Related Topics
Watchkit Extension Cannot Read from Icloud
Swift Dictionary Initialization of Custom Type Gives: '>' Is Not a Postfix Unary Operator Error
Set Maximum Characters (To One) in a Nstextfield in Swift
How to Name File Stored to Files App via Uactivityviewcontroller
How to Set .Realm File on Realm
Preload a Scene to Prevent Lag
Generic Return Type Based on Class
Spritekit Skscene Not Resizing Correctly to Fit iPhone 12
Convert Gregorian Date to Hijri Date
Nsundomanager: Capturing Reference Types Possible
Data Structure for Fast Lookup with Multiple Criteria
How to Create a UIprintpaper to Test UIprintinteractioncontrollerdelegate
Wkwebview on Macos Cuts Off Top
Pinterest-iOS 2.3 and Swift: Calling Createpinwithimageurl Results in Exc_Bad_Access
Programmatic Beginrefreshing() on iOS11 Has Problems with Largetitles Mode
Downloading PDF Using Nsurlsession (Http Post) with Parameters