RealmSwift: No such module 'RealmSwift'

A very important sanity check: if you run into this and you're using Cocoapods, please make sure you open the .xcworkspace and not the .xcodeproj file!


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.


Follow below steps, it may be useful for you.

  • Go To: Product > Schemes > New Scheme...
  • Select: RealmSwift and click OK
  • Build the RealmSwift target (cmd + b)

I had the same problem like you. I resolved it by add the following code into pod file.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'

Tags:

Ios

Swift

Realm