Skip to content

fix: Fix stripped categories in static frameworks #6134

@github-actions

Description

@github-actions

Note

The pull request "fix: Fix stripped categories in static frameworks" was created by @noahsmartin but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.

This fixes a crash when using Sentry as a static framework. The linker will try to remove these @objc extensions in static frameworks because they are in a file with no other used classes. To avoid this we need to put something else in these files that get referenced from another part of the codebase. This isn't a problem for Swift, but is for objc that uses performSelector

This made me realize we don't have a CI test for sentry being used as a static framework. We should add one, but it's a bit tricky to do without SPM, that's why this is still a WIP

#skip-changelog

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions