无法加载"RealmSwift"的基础模块 [英] Cannot load underlying module for 'RealmSwift'

查看:105
本文介绍了无法加载"RealmSwift"的基础模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过Cocoapods安装Realm for Swift.

I'm trying to install Realm for Swift via Cocoapods.

首先,我要做的是 pod init 到我的项目中

然后我打开podfile并像这样更改它:

First what I did was pod init into my project

Then I open podfile and changed it like this:

target 'Taskio' do
use_frameworks!
pod 'RealmSwift'

end

然后我关闭podfile并执行命令 pod install

Then I closed podfile and execute command pod install

一切顺利.但是现在当我打开工作区时,导入RealmSwift时出现错误

Everything pass good. But now when i opened workspace I'm getting error while importing RealmSwift

无法为"RealmSwift"加载基础模块

Cannot load underlying module for 'RealmSwift'

推荐答案

首先尝试检查安装cocoapods之后打开的工作空间,打开 App.xcworkspace 文件.如果是,请打开Pods目录并检查是否该文件实际上是通过手动导航到 REALM 文件夹来安装的.导航到文章后,可以得出结论:

Firstly try to check what workspace you open after cocoapods were install open App.xcworkspace file.If yes open Pods directory and check if file is actually installed by manually navigation to REALM folder. After navigation to this article it is possible to conclude that you should:

新项目->构建和运行->通过cocoapods添加领域->打开Xcode 工作区->重新构建并运行=成功

New project -> build&run -> add realm via cocoapods -> open Xcode workspace -> build&run again = success

这篇关于无法加载"RealmSwift"的基础模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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