【发布时间】:2015-12-09 13:36:15
【问题描述】:
我刚刚将我的 Xcode 更新到了 7.2 版。现在我尝试使用 xcodebuild 从命令行构建framework,但出现此错误
.... /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6:9: note: in file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAMediaTiming.h:6:
#import <QuartzCore/CABase.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CABase.h:11:10: error: could not build module 'Darwin'
#include <stdbool.h>
^
/Users/atran/Desktop/Repos/DSA_Working_Directory/Libs/Kingfisher/Kingfisher/Kingfisher.h:27:9: note: while building module 'UIKit' imported from /Users/atran/Desktop/Repos/DSA_Working_Directory/Libs/Kingfisher/Kingfisher/Kingfisher.h:27:
#import <UIKit/UIKit.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:9: note: while building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
#import <QuartzCore/CATransform3D.h>
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:9: note: while building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
#import <OpenGLES/EAGLDrawable.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h"
^
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: error: could not build module 'Foundation'
#include <Foundation/Foundation.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "/Users/atran/Desktop/Repos/DSA_Working_Directory/Libs/Kingfisher/Kingfisher/Kingfisher.h"
^
/Users/atran/Desktop/Repos/DSA_Working_Directory/Libs/Kingfisher/Kingfisher/Kingfisher.h:27:9: error: could not build module 'UIKit'
#import <UIKit/UIKit.h>
^
<unknown>:0: error: could not build Objective-C module 'Kingfisher'
在 XCode 7.1 中一切正常。所以 XCode 7.2 中一定有一些改变。有人知道吗?
编辑:
这是我的构建命令
这行得通
xcodebuild clean build -workspace XYZ.xcworkspace -scheme ABC -configuration Debug -sdk iphoneos
这不起作用:
xcodebuild clean build -workspace XYZ.xcworkspace -scheme ABC -configuration Debug -sdk iphonesimulator
【问题讨论】:
-
试过构建干净,删除派生数据文件夹并重建?
-
这是我尝试的第一件事,但没有成功。
-
我遇到了同样的问题,但什么也没有。如果有人发现了什么,请分享。
-
您使用的命令行参数是什么?我在这里看到了类似的问题,我认为这与
-sdk iphonesimulator没有得到充分尊重有关,看起来它正在尝试使用该 SDK,但它输出到错误的中间构建文件夹,在我的情况下,如果我使用 @ 987654326@ 也可以看到,虽然设置说它应该转到Debug-iphonesimulator,但它实际上试图将二进制文件放入Build/Products/Debug-iphoneos文件夹中。 -
我编辑了我的问题以显示我使用的命令。
标签: ios xcode module xcodebuild