rickclephas / NSExceptionKt

A Kotlin Multiplatform Library to improve crash reports on Apple platforms
MIT License
168 stars 12 forks source link

Incompatible with sentry-cocoa >=8.7.1 #15

Closed hbmartin closed 1 year ago

hbmartin commented 1 year ago

Header files for Sentry were generated with 7.21.0 (https://github.com/rickclephas/NSExceptionKt/issues/7#issuecomment-1693635966). NSExceptionKt_SentryCrashStackCursorCleanup calls sentrycrash_async_backtrace_decref in https://github.com/rickclephas/NSExceptionKt/blob/master/nsexception-kt-sentry/src/nativeInterop/cinterop/Sentry/Private/SentryCrashMonitor_NSException%2BNSExceptionKt.h#L21

This was removed by the deletion of SentryHook as of sentry-cocoa 8.7.1 https://github.com/getsentry/sentry-cocoa/compare/8.7.0...8.7.1 which leads to a missing symbol called crash when later Sentry versions are used in the iOS project. It seems Sentry decided the async dereferencing was no longer needed? https://github.com/getsentry/sentry-cocoa/pull/3020

I'm not sure how to generate the headers in this project from Sentry's but I'll work on figuring that out and try to put up a PR. (fwiw, 8.7.1 was released over 3 months ago so I suspect this may come up more)

rickclephas commented 1 year ago

Thanks for the detailed explanation! The headers are created manually. If Sentry has just removed the whole function, then I guess so should we. Otherwise, we would need to update the logic accordingly.

rickclephas commented 1 year ago

Fix has been released in v0.1.10.