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

Missing SentryCrashExceptionApplication Implementation for non-MacOS Builds Causes Linker Error #4758

Closed
phunkeler opened this issue Jan 28, 2025 · 2 comments · Fixed by #4759

Comments

@phunkeler
Copy link

Platform

iOS

Environment

Production

Installed

Manually

Version

8.41.0

Xcode Version

16.2

Did it work on previous versions?

8.39.0

Steps to Reproduce

On Mac:

  1. Clone sentry-dotnet
  2. Change version in modules/sentry-cocoa.properties from 8.39.0 to 8.41.0
  3. Build the samples/Sentry.Samples.Maui app

Expected Result

Build completed successfully.

Actual Result

Mac (Intel):

Xamarin.Shared.Sdk.targets(1663,3): Error: clang++ exited with code 1:
Undefined symbols for architecture x86_64:
OBJC_CLASS$_SentryCrashExceptionApplication”, referenced from:
initial-undefines
Id: symbol(s) not found for architecture x86_64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Mac (M3):

Xamarin.Shared.Sdk.targets(1663,3): Error: clang++ exited with code 1:
Undefined symbols for architecture arm64:
OBJC_CLASS$_SentryCrashExceptionApplication”, referenced from:
initial-undefines
Id: symbol(s) not found for architecture arm64
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Are you willing to submit a PR?

No response

@phunkeler
Copy link
Author

phunkeler commented Jan 28, 2025

For non-macOS platforms (when TARGET_OS_OSX is false), the header declares SentryCrashExceptionApplication as a subclass of NSObject, but there's no implementation provided for this case.

If SentryCrashExceptionApplication is truly only meant for macOS, shouldn't the header file reflect that? Otherwise, an "empty" implementation should be provided for non-macOS platforms (like it was before #4471)?

This affects sentry-dotnet/pull/3786 and ultimately, something that can be circumvented on the dotnet-side, if need be.

@brustolin
Copy link
Contributor

Thanks for reaching out @phunkeler. We will release a fix soon.

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