我已成功从终端执行Swift代码,也从Xcode机器人的前/后触发器中成功执行。但我正在努力为构建预操作编写Swift脚本。有没有人管理过这个?
这就是我的预行动:
当我从终端(xcodebuild -scheme UAT build
)构建时,我看到以下错误:
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:10: note: while building module 'Darwin' imported from /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:11:
#include <sys/types.h>
^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "sys/cdefs.h"
^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/usr/include/sys/cdefs.h:707:2: error: Unsupported architecture
#error Unsupported architecture
^
更新
如果我只是打印一些东西而不导入Foundation模块那么它就可以了。即print("Hello")
。但我显然不能使用NSProcessInfo
。