切换到Xcode 10(现在必须使用旧版构建系统)之后,我开始收到如下所示的错误。在本地,我几乎可以清理所有东西来修复它们,例如Derived Data / Build etc...
在Xcode中运行“调试和发布”对我来说运行良好,但是我一直在努力解决CI(位图)中的这个问题。
我们使用Fastlane,我们的通道具有清除派生数据并执行干净构建的步骤。
clear_derived_data
build_ios_app(
workspace: "application.xcworkspace",
scheme: "application",
clean: true
)
但是这些错误仍在发生(这些例子很少,大约有30个类似的错误接following而至,并指向诸如Darwin等的相同软件包。)
❌ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:16:10: could not build module 'Darwin'
#include <sys/types.h>
^~~~~~~~
❌ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/usr/include/dispatch/dispatch.h:25:10: could not build module 'Darwin'
#include <Availability.h>
~~~~~~~~^
❌ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.0.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:10: could not build module 'CoreFoundation'
#include <CoreFoundation/CoreFoundation.h>
~~~~~~~~^
❌ /Users/vagrant/git/packages/skimitar-app/node_modules/react-native-firebase/ios/RNFirebase/functions/RNFirebaseFunctions.h:3:9: could not build module 'Foundation'
#import <Foundation/Foundation.h>
~~~~~~~~^
编辑:传统的构建设置是否会保留,即如果在我们的Xcode中设置并提交给git,ci是否还会使用旧版构建系统?
答案 0 :(得分:1)
答案 1 :(得分:0)
我通过将构建系统设置为“旧版”来解决此问题。
打开PROJECT_NAME.workspace file
然后在顶部菜单中选择File > Workspace Settings
然后将Build System
更改为Legacy Build System