Q:

Adding RealmSwift as a subproject: Missing required modules: 'Realm.Private', 'Realm'

So I wanted to link to RealmSwift in my own framework and these are the steps I took:

Add RealmSwift as a subproject

Link the framework:

Add the dependency

Import RealmSwift into the Swift file:

And I got the error: Missing required modules: 'Realm.Private', 'Realm'. How can I solve this issue? Thanks!

A:

You'll need to add /path/to/RealmSwift.framework/Frameworks 
to the “Framework Search Paths” section in Build Settings
where /path/to/RealmSwift.framework is the location of the framework. 
This is because RealmSwift.framework depends on Realm.framework (where the Realm and Realm.Private modules are defined), which is vendored in its Frameworks directory.

