-
-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a sentry SPM package without UIKit #3460
Comments
Since v 8.14.1, you should be able to use the SDK without linking UIKit. You shouldn't have to use an extra SPM package. Please reopen the issue if that doesn't solve your problem. |
Does the SDK link UIKit by default? If yes, how can I turn it off in the context of app extensions and have it available within the main app? Where does one set |
@armcknight, you came up with the fix. I think nothing is required from the user side if I'm not mistaken. If not, can you please explain? We must put this info into the docs as well if we didn't do this already. |
We did not implement support for SPM for this type of configuration yet. It's still basically an experimental feature that was only developed so far for one customer that does not use SPM. I don't know for sure but seems like we'd need another target in the Package.swift that sets the alternate build configuration ( We might have to refactor UIKit-based code into a separate target from the Sentry framework target, something like SentryUIKit, as we initially had discussed as a possibility, so it can be omitted from SPM linkages. You're right about docs @philipphofmann, we should at least point out this limitation in CHANGELOG. |
Yes, changelog makes sense 👍.
Yes, the proper way to do this is to split Sentry into a core version without UIKit or other dependencies, something like SentryCore (I'm sure there could be a better name), and then have the default with UIKit. But that's a more significant refactoring. |
Problem Statement
We use sentry over SPM and we would like an out-of-the-box sentry package without UIKit available. Is this possible?
Solution Brainstorm
We could duplicate the current target in
Package.swift
and set relevant GCC_PRE_PROCESSOR_DEFINITIONS as followsThe text was updated successfully, but these errors were encountered: