导入框架时Xcode“无法构建模块MobileCoreServices.h”

时间:2014-11-03 03:14:22

标签: objective-c xcode import

我正在尝试使用UIImagePickerController,但我需要包含MobileCoreServices框架才能这样做。

我已将import语句放在 ViewController.h 文件中:

#import <MobileCoreServices/MobileCoreServices.h>

但是我收到了一个错误:

"Could not build module MobileCoreServices.h".

我已经在项目构建短语中链接了MobileCoreServices框架,我在框架文件夹的侧边栏上看到它,但它仍然给我一个错误。

有人知道解决方案吗?

1 个答案:

答案 0 :(得分:9)

没关系所有人!

另一个线程上的另一个SO用户解决了这个问题:

Could not build module 'UIKit" in cocoapods since Xcode 5.1

转到DerivedData目录并删除ModuleCache目录。

在终端:

cd ~/Library/Developer/Xcode/DerivedData
rm -rf ModuleCache/

保持此线程存活,以防其他人在将来遇到此问题。

谢谢!

相关问题