I'm working on a rather large iOS project that was originally written in Objective-C and we're now starting to add in Swift code. We are using Cocoapods to install 3rd party libraries and have included use_frameworks!
in our Podfile.
In some of our Objective-C classes, we have added module imports at the top such as @import AFNetworking;
Usually, on first build of the project within Xcode, the build fails and we see module 'AFNetworking' not found
but on the second build, it works fine. However, now I am trying to get Fastlane to do our builds and when using Fastlane to do the builds, we get the error 100% of the time.
In the build settings of the target:
Enable Modules (C and Objective-C)
is set to Yes
Always Search User Paths
is set to No
User Header Search Paths
is set to $(SRCROOT)/Pods
and is recursiveAny suggestions on what else I can check/try?
答案 0 :(得分:0)
答案 1 :(得分:0)
今天我终于找到了问题的解决方案。我们的项目由多个目标(10+)组成,我们注意到只有一个目标无法构建。经过几个小时的狩猎,比较文件,我们最终查看了方案,并注意到无效的目标是使用Find Implicit Dependencies
取消选中的方案。我们检查过这个,它又开始重建了!
请注意,如果我们在构建其中一个目标之后构建它,但是如果您随后删除了派生数据并尝试构建目标,那么目标就会构建,那么它就会失败。