sentry-kotlin-multiplatform
sentry-kotlin-multiplatform copied to clipboard
Use trimmed headers instead of cocoapods for Apple targets
Problem
Currently we use cocoapods to pull in the Sentry Cocoa SDK dependency for Apple targets. This might create an overhead by also pulling in many headers that we don't use. (needs investigation how big this overhead actually is)
Solution
Grab and trim headers that we need so we only define the utmost minimum that we need to support the Cocoa SDK features that we are using and run cinterop on those.
We are already doing this for accessing private Sentry Cocoa SDK features: https://github.com/getsentry/sentry-kotlin-multiplatform/tree/main/sentry-kotlin-multiplatform/src/nativeInterop/cinterop
Testing
This will break internal tests on the cocoa side but that's easily fixable by just introducing the workaround mentioned here