Closed jerrymarino closed 4 years ago
alternately these .m files could import their own .h first (which has Foundation imports), and then read the TARGET_OS_*
stuff.
It may be worth noting that this issue would be found if the Xcode build used no prefix headers or precompiled headers.
@bolsinga where are you seeing a prefix header used? I didn't notice one in the repo or podspec. That being said, I noticed a few places that TargetConditionals.h
wasn't imported, where this define is defined. Simply put, the code needs to import TargetConditonals.h
in some shape or form before using this define
cc @xander-jones do you have any suggestions?
@bolsinga where are you seeing a prefix header used? I didn't notice one in the repo or podspec. That being said, I noticed a few places that
TargetConditionals.h
wasn't imported, where this define is defined. Simply put, the code needs to importTargetConditonals.h
in some shape or form before using this define
This code doesn't import "TargetConditionals.h" anywhere manually, so the only way I understand that the .m files affected would compile "in the wild" is with some sort of a prefix header afaik.
We believe this issue has now been fixed in https://github.com/bugsnag/bugsnag-cocoa/pull/654, released in v6.0.0.
Note: There are a number of breaking changes in v6.0.0 as part of an effort to improve the interface and make it more consistent across our error reporting libraries, so please refer to the upgrade guide: https://github.com/bugsnag/bugsnag-cocoa/blob/master/UPGRADING.md
The way that this define works is that TargetConditionals.h uses checks that are set implcitly by clang.
Before using TARGETOS* TargetConditionals.h should be imported or it won't work. Often in bugsnag this is implicitly imported by Foundation.h