找不到CocoaLumberjack.h文件?

问题描述

实际上,我的项目确实针对iPhone 6s进行编译,但不针对任何iOS模拟器进行编译。当我想为模拟器进行构建时,会遇到两个构建时间错误
错误

'CocoaLumberjack/CocoaLumberjack.h' file not found

Failed to emit precompiled header 
'/DerivedData/Project/Build/Intermediates.noindex/precompiledHeaders/Bridging-Header-swift.pch' 
for bridging header 
'/Users/Development/ProjectMobile/Views/Project-Bridging-Header.h'

我尝试过什么?

  • pod deintegrate,清除“生成”,删除“ DerivedData”,pod installpod update
  • 打开Project.xcworkspace而不是Project.xcodeproj
  • 保持目标podfile中的iOS版本和部署目标相同(iOS 12)
  • 在目标构建设置1上检查“框架搜索路径”
  • 选中“标题搜索路径” 2

我不确定路径是否正确100%。而且我想知道Xcode找不到Cocoalumberjack.h,因为我可以在/Pods/CocoaLumberjack/Sources/CocoaLumberjack/Supporting Files/CocoaLumberjack.h下找到它。

问题
这些路径可能不正确吗?
还有什么问题吗?

每个认真的回答我都很高兴!

(1)框架搜索路径

Framework Search Paths

(2)标题搜索路径

Header Search paths

解决方法

由于未针对模拟器设置有效的CPU体系结构,因此Xcode无法为iOS模拟器构建项目(对于Mac)。

Project > Targets > User-Defined > VALID_ARCHS下仅设置了armv7armv7sarm64体系结构。

我在x86_64中添加了VALID_ARCHS体系结构,现在可以正常使用了。