将RealmSwift添加为子项目:缺少必需的模块:'Realm.Private','Realm' [英] Adding RealmSwift as a subproject: Missing required modules: 'Realm.Private', 'Realm'

查看:120
本文介绍了将RealmSwift添加为子项目:缺少必需的模块:'Realm.Private','Realm'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我想在自己的框架中链接到RealmSwift,这些是我采取的步骤:

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

  1. 添加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(定义了RealmRealm.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆