Closed longda closed 5 days ago
I get a different error when adding sentry-cocoa via SPM to an empty visionOS project. We have to investigate this and fix it. Thanks for reporting this, @longda. Furthermore, I'm surprised that our CI isn't failing. We should add a check to avoid such issues in the future.
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
"std::__1::__shared_weak_count::__get_deleter(std::type_info const&) const", referenced from:
vtable for std::__1::__shared_ptr_emplace<sentry::profiling::ThreadMetadataCache, std::__1::allocator<sentry::profiling::ThreadMetadataCache>> in Sentry[arm64][33](SentrySamplingProfiler.o)
vtable for std::__1::__shared_ptr_emplace<sentry::profiling::SamplingProfiler, std::__1::allocator<sentry::profiling::SamplingProfiler>> in Sentry[arm64][163](SentryProfiler.o)
...
```
ld: warning: Could not find or use auto-linked framework 'CoreAudioTypes': framework 'CoreAudioTypes' not found
Undefined symbols for architecture arm64:
"std::__1::__shared_weak_count::__get_deleter(std::type_info const&) const", referenced from:
vtable for std::__1::__shared_ptr_emplace
Observed the same error while building for iOS.
Turns out you cannot use Sentry and Sentry-Dynamic at the same time. Sentry and Sentry-SwiftUI works fine. Document should be updated of the SPM changes.
Turns out you cannot use Sentry and Sentry-Dynamic at the same time
You're right, those are the same libraries, but different linking types (static and dynamic).
We will revisit the docs.
Thanks for pointing this out.
@brustolin Yes, that was the issue! Only Sentry-Dynamic worked for me on VisionOS but it does work! Thank you! 🙏
@longda Thanks for the reply.
Platform
visionOS
Environment
Production
Installed
Swift Package Manager
Version
8.33.0
Xcode Version
15.4
Did it work on previous versions?
Unknown, first install
Steps to Reproduce
Expected Result
After install of sentry-cocoa package project should build cleanly.
Actual Result
Three errors appear:
Screenshot (product + project names redacted):
Did not see any related solutions at: https://docs.sentry.io/platforms/apple/guides/visionos/troubleshooting/
Are you willing to submit a PR?
No response