将RealmSwift添加为子项目:缺少必需的模块:'Realm.Private','Realm' [英] Adding RealmSwift as a subproject: Missing required modules: 'Realm.Private', 'Realm'
问题描述
所以我想在自己的框架中链接到RealmSwift,这些是我采取的步骤:
So I wanted to link to RealmSwift in my own framework and these are the steps I took:
-
添加
RealmSwift
作为子项目
链接框架:
添加依赖项
将RealmSwift
导入到Swift文件中:
Import RealmSwift
into the Swift file:
我得到了错误:Missing required modules: 'Realm.Private', 'Realm'
.我该如何解决这个问题?谢谢!
And I got the error: Missing required modules: 'Realm.Private', 'Realm'
. How can I solve this issue? Thanks!
推荐答案
您需要添加/path/to/RealmSwift.framework/Frameworks
进入构建设置"中的框架搜索路径"部分
You'll need to add /path/to/RealmSwift.framework/Frameworks
to the "Framework Search Paths" section in Build Settings
其中,/path/to/RealmSwift.framework
是框架的位置.
where /path/to/RealmSwift.framework
is the location of the framework.
这是因为RealmSwift.framework
依赖于Realm.framework
(定义了Realm
和Realm.Private
模块的位置),该产品在其Frameworks
目录中提供.
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.
这篇关于将RealmSwift添加为子项目:缺少必需的模块:'Realm.Private','Realm'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!