sentry-kotlin-multiplatform icon indicating copy to clipboard operation
sentry-kotlin-multiplatform copied to clipboard

Use trimmed headers instead of cocoapods for Apple targets

Open buenaflor opened this issue 2 years ago • 0 comments

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

buenaflor avatar Apr 18 '23 07:04 buenaflor