I am releasing a new version of my CocoaPods library. In this version I included the UIDevice-Hardware.h category.
I am aware of the use of the -ObjC
flag to import categories in static libraries. In Build Phases -> Copy Headers
, UIDevice-Hardware.h
is in 'Project'.
When I run pod lib lint --no-clean
, I thought the -ObjC
flag would be set, but I get the error:
- ERROR | [xcodebuild]
TCBlobDownload/TCBlobDownload/TCBlobDownload/TCBlobDownloader.m:16:9: fatal error:
'UIDevice-Hardware.h' file not found
Pods project available at `/private/tmp/CocoaPods/Lint/Pods/Pods.xcodeproj` for inspection.
So I added this line in my .podspec
:
spec.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load -force_load' }
Yeah, all three flags, just to be sure.
And I still got the same error. I checked the said Pods.xcodeproj
and in it's target, Other Linker Flags
is empty, no -ObjC
or anything else. But the .xcconfig
files have my flags defined in the .podspec
... I don't know where to go from that.
The library builds well when I import it in a test project in which I set the flag. How can I make it lint with CocoaPods?