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

[Mac Catalyst] Build issues in a React Native project with Sentry #2944

Closed
5 of 12 tasks
birdofpreyru opened this issue Mar 30, 2023 · 1 comment · Fixed by #2936
Closed
5 of 12 tasks

[Mac Catalyst] Build issues in a React Native project with Sentry #2944

birdofpreyru opened this issue Mar 30, 2023 · 1 comment · Fixed by #2936

Comments

@birdofpreyru
Copy link

birdofpreyru commented Mar 30, 2023

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android
  • Mac Catalyst

SDK:

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

SDK version: 5.3.0

react-native version: 0.71.5

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:

[Link to issue]

Configuration:
Irrelevant.


I have following issue:

I am trying to build an existing (i.e. it builds & works fine for iOS target) React Native project with Sentry for Mac Catalyst. The build results in a few errors in Sentry SDK's Objective-C code, which I believe should be patched as the following:

BOOL enableNativeCrashHandling = (BOOL)[mutableOptions valueForKey:@"enableNativeCrashHandling"];

should become

BOOL enableNativeCrashHandling = [mutableOptions valueForKey:@"enableNativeCrashHandling"] != nil;

and here:

BOOL enableAutoPerformanceTracing = (BOOL)[mutableOptions valueForKey:@"enableAutoPerformanceTracing"];

should become

BOOL enableAutoPerformanceTracing = [mutableOptions valueForKey:@"enableAutoPerformanceTracing"] != nil;

Otherwise compiler gives me this error in both places:

Cast from pointer to smaller type 'BOOL' (aka 'signed char') loses information

I can create a PR later if these look right for you, or probably you'll be faster just to do these corrections yourself :)

I have submitted PR #2945

Steps to reproduce:

  • Step 1
  • Step 2

Actual result:

[Actual result]

Expected result:

[Expected result]

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