KSCrash
KSCrash copied to clipboard
Build failure under Xcode 12
Build error:
KSCrash/Recording/Tools/KSObjC.c:198:54: error: use of undeclared identifier 'kCFCoreFoundationVersionNumber_iOS_8_x_Max'
please see details here: https://github.com/rollbar/rollbar-ios/issues/334
im having this issue as well. Could you provide more detail for reasons and the solution used in rollbar-ios? Don't we need arm64 architecture?
@ftcvlad , we do not really have a solution. it is more like a workaround until KSCrash introduces a proper fix. It looks like the solution needs to be on the KSCrash side. If I still remember correctly the details, the build error was introduced by conditional compilation for arm64 targeting macOS. As the result, KSCrash reporter attempts to use an Apple defined constant that does not exist under macOS (or something like that - i'll try to look up my notes with the name of the constant ia bit later and will add it here).
@ftcvlad , oops, apparently, I already posted the name of the constant at the time I opened this issue (see my very first/initial comment here)...
Is there any fix available for this issue? @akornich
@saravanan-selvam , not as far as I know. I tried to have a workaround for this by playing with the build setting on our side - but without any success so far. Didn't Apple drop support of iOS 8 in Xcode 12? I have a feeling you, guys, need to replace the condition involving kCFCoreFoundationVersionNumber_iOS_8_x_Max
using an alternative constant supported by Xcode 12?
Add missing file in directory KSCrash/swift/Basic
to group Crash Recording/Support/swift/Basic
.
@saravanan-selvam , not as far as I know. I tried to have a workaround for this by playing with the build setting on our side - but without any success so far. Didn't Apple drop support of iOS 8 in Xcode 12? I have a feeling you, guys, need to replace the condition involving
kCFCoreFoundationVersionNumber_iOS_8_x_Max
using an alternative constant supported by Xcode 12?
@akornich Thanks for the response, Since macOS (Apple Silicon) supports arm64 from Xcode 12, KSCrash started to throw error while trying to compile for macOS. So I just added a '#if !TARGET_OS_OSX' macro check inside conditional arm64 check '#if defined(arm64)' and now it works.
#if defined(arm64) #if !TARGET_OS_OSX if (floor(kCFCoreFoundationVersionNumber) <= kCFCoreFoundationVersionNumber_iOS_8_x_Max) { return (const struct class_t*)(isa & ISA_MASK_OLD); } #endif return (const struct class_t*)(isa & ISA_MASK); #else
@saravanan-selvam , thank you! Is the change already in? I do not see any commit linked to this issue...