xcode 导入框架时Xcode“无法构建模块MobileCoreServices.h”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26707252/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode "Could Not Build Module MobileCoreServices.h" when importing the framework
提问by hmzfier
I'm trying to use UIImagePickerController
, but I need to include the MobileCoreServices
framework in order to do so.
我正在尝试使用UIImagePickerController
,但我需要包含MobileCoreServices
框架才能这样做。
I've placed the import statement in my ViewController.hfile:
我已将 import 语句放在我的ViewController.h文件中:
#import <MobileCoreServices/MobileCoreServices.h>
But I get an error:
但我收到一个错误:
"Could not build module MobileCoreServices.h".
I've also already linked the MobileCoreServices
framework in the project build phrases, and I see it there on the sidebar in the frameworks folder, but it's still giving me an error.
我也已经MobileCoreServices
在项目构建短语中链接了框架,我在框架文件夹的侧边栏上看到它,但它仍然给我一个错误。
Does anyone know a solution this?
有谁知道这个解决方案?
回答by hmzfier
Nevermind everyone!
大家别管了!
This problem was solved by another SO user on another thread:
这个问题是由另一个 SO 用户在另一个线程上解决的:
Could not build module 'UIKit" in cocoapods since Xcode 5.1
自 Xcode 5.1 起无法在 cocoapods 中构建模块“UIKit”
Go to your DerivedData directory and remove ModuleCache directory.
转到您的 DerivedData 目录并删除 ModuleCache 目录。
In terminal:
在终端:
cd ~/Library/Developer/Xcode/DerivedData
rm -rf ModuleCache/
Keeping this thread alive in case anyone else runs into this problem in the future.
保持此线程处于活动状态,以防其他人将来遇到此问题。
Thanks!
谢谢!