CocoaLumberjack.h file not found?

3.7k views Asked by At

Actually my project does compile for an iPhone 6s but not for any iOS simulators. When I want to build for a simulator I get two build time errors.
Errors

'CocoaLumberjack/CocoaLumberjack.h' file not found

and

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'

What have I tried yet?

  • pod deintegrate, clear Build, delete "DerivedData", pod install and pod update
  • open Project.xcworkspace instead of Project.xcodeproj
  • keep target iOS version in podfile and deployment target the same (iOS 12)
  • check "Framework Search Paths" at targets build settings 1
  • check "Header Search paths" 2

I am not 100% sure if the paths are correct. And I am wondering that Xcode can't find Cocoalumberjack.h, because I can find it under /Pods/CocoaLumberjack/Sources/CocoaLumberjack/Supporting Files/CocoaLumberjack.h.

Questions
Are these paths probably incorrect?
What else could be the problem?

I am happy for every serious answer!

(1) Framework Search Paths
Framework Search Paths

(2) Header Search paths
Header Search paths

1

There are 1 answers

1
Marcel Hofgesang On BEST ANSWER

Xcode couldn't build the project for an iOS simulator because there was no valid CPU architecture set for the simulator (respectively for the Mac).

Under Project > Targets > User-Defined > VALID_ARCHS there were just armv7, armv7s and arm64 architectures set.

I added x86_64 architecture to the VALID_ARCHS and it works fine now.