1

I am using RealmSwift in my project. I followed all the instructions while setting up Realm for my project, like dragging the frameworks into the embedded binaries section, setting up the framework search path and including the required Run script in Build Settings. The project works fine after that. Then while committing the changes, I committed the header files and bcsymbol files etc of the included Realm frameworks.

After that, I took a checkout of my project. After the checkout, on opening the project, I am getting this error: 'No such module RealmSwift'.

I tried deleting the frameworks and adding them again, and cleaning the project. The project just won't compile. It keeps giving the same error. What am I doing wrong?

Crazed'n'Dazed
  • 461
  • 1
  • 7
  • 20

1 Answers1

0

Hmm, there's no real good answer for solving this sort of problem, as it can happen for a variety of reasons.

More often than not, like in this SO question, it can be caused by the Framework Header Search not being set up correctly, and so the project isn't able to see the framework correctly.

If worse comes to worse, make sure to absolutely delete every reference of RealmSwift in your project (Including in the build settings) and try installing it from scratch again. Good luck!

Community
  • 1
  • 1
TiM
  • 15,812
  • 4
  • 51
  • 79
  • I found that the checked out project is pointing to that location of RealmSwift.framework, which is kept in the original folder, instead of pointing to the framework in the checked out folder. How can that be changed, so that the framework search path points to the correct location every time someone checks out the code?Trying out the solution in the link you've given – Crazed'n'Dazed Jul 20 '16 at 08:49
  • When you drag the framework into the project for the first time, you'll be presented with a dialog with a checkbox that says `Copy items if needed`. If this is checked, the frameworks will be copied into the project and relative paths are set. If not, then an absolute path will be set to their external location, which will break if they are then removed. It's always recommended to keep `Copy items if needed` check when importing Realm into a project. :) – TiM Jul 20 '16 at 09:01
  • It was checked in my case – Crazed'n'Dazed Jul 20 '16 at 09:24