Skip to content
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

Latest version (5.19.2 → 5.22.0) breaks on react-native-macos #3774

Closed
5 of 12 tasks
ospfranco opened this issue Apr 24, 2024 · 1 comment · Fixed by #3784
Closed
5 of 12 tasks

Latest version (5.19.2 → 5.22.0) breaks on react-native-macos #3774

ospfranco opened this issue Apr 24, 2024 · 1 comment · Fixed by #3784

Comments

@ospfranco
Copy link
Contributor

ospfranco commented Apr 24, 2024

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android
  • macOS

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.22.0

react-native version: 0.73.1

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

I have the following issue:

I have react native macOS app that doesn't use catalyst but rather react-native-macos. This means UIKit is not available.

I've just tried to update from rn-sentry 5.19.2 to 5.20.0 and it breaks macOS compatibility in a major way. I know macOS is not officially supported but everything was working mostly fine on each release, I only had to do minor patches. Also the fact that on the code exists the macro pre-processor SENTRY_HAS_UIKIT (paraphrasing, don't have the exact flag at hand) also implies there are some guards when not running on iOS.

On version 5.19.2 I only had to patch the following method:

CleanShot 2024-04-24 at 07 34 41@2x

On version 5.22.0 there is a new frame tracker feature that is heavily dependent on UIKit and breaks compilation on different places. Since the native sentry SDK for ios/macOS doesn't export all the symbols. I quickly tried to add more preprocessor checks, using the same SENTRY_HAS_UIKIT, but the amount of errors was too much.

Do you guys think it is possible to conditionally compile and check for UIKIT or is it too much work for you guys?

Steps to reproduce:

  • Create a react-native-macos project
  • Install @sentry/react-native
  • Try to compile the app
@kahest
Copy link
Member

kahest commented Apr 24, 2024

Hey @ospfranco thanks for reaching out and your interest! Apologies for breaking your use case, we'll take a look at if/how we can help you out here, but can't give you an ETA right now.

@krystofwoldrich we recently added support for building the Cocoa SDK without UIKit dependency - we could investigate whether it helps/makes sense to use that somehow to support this use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants