Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Header file not found sometimes using Cocoapods HockeySDK

I have a build script using the xcodebuild command line tool using the archive action.

  • The build succeeds:
    • on my machine using xcode.
    • on my machine using the build script.
    • on the build server using xcode.
  • The build fails:
    • on the build server the build script.

The failure is related to a missing header in one of the pods. (It happens to be the HockeySDK).

=== BUILD TARGET Pods-HockeySDK OF PROJECT Pods ===
....
CompileC ... /Library/TeamCity/../Pods/HockeySDK/Classes/BITCrashReportTextFormatter.m:34:9: 
fatal error: 
  'CrashReporter/CrashReporter.h' file not found

The line is:

#import <CrashReporter/CrashReporter.h>

In file, (source is here)

/../MyApp/Pods/HockeySDK/Classes/BITCrashReportTextFormatter.m

The actual header can be found in the framework here:

/../MyApp/Pods/HockeySDK/Vendor/CrashReporter.framework/Versions/A/Headers/CrashReporter.h

I have noticed there are 2 links to the file in the XCode project navigator, not sure if this is a clue or not:

Pods

So I assume it is a missing header search path? However, I have ran a pod install and pushed the changes to the build server.

We are using using HockeySKD - 3.5.4 (the latest). The podspec has a link to the crash reporter framework using this syntax (not sure how it works).

s.ios.vendored_frameworks = 'Vendor/CrashReporter.framework'

The search paths in the pods project looks like this:

search paths in the pods project

like image 474
Robert Avatar asked Feb 21 '26 17:02

Robert


1 Answers

The build is failing because of the pod header files got corrupted because of the TeamCity git checkout.

To fix change the checkout mode from Automatically on Server to Automatically on agent (need to select show advanced) and enable clean on checkout for one build.

like image 175
Robert Avatar answered Feb 23 '26 07:02

Robert