Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RealmSwift: No such module 'RealmSwift'

Tags:

ios

swift

realm

I configured RealmSwift 1.0.0 Latest Using Docs into the Xcode project. After installation i created a class file and getting module error - like: No such module 'RealmSwift' in class file.

1.

enter image description here

2.

enter image description here

3. enter image description here

4. enter image description here

  1. After adding the Realm Plugin, i created a class and get the module error below.

enter image description here

Please help me to solve this error.

like image 796
Gaurav Vyas Avatar asked Jun 07 '16 15:06

Gaurav Vyas


4 Answers

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!

like image 63
JillevdW Avatar answered Nov 13 '22 18:11

JillevdW


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)
like image 14
Ladumor Dineshkumar Avatar answered Nov 13 '22 19:11

Ladumor Dineshkumar


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.

like image 8
bdash Avatar answered Nov 13 '22 19:11

bdash


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'
like image 5
Dat Huynh Avatar answered Nov 13 '22 19:11

Dat Huynh