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

Sentry problems in XCode project #1343

Closed
perholmes opened this issue May 26, 2023 · 5 comments
Closed

Sentry problems in XCode project #1343

perholmes opened this issue May 26, 2023 · 5 comments
Labels
Bug Something isn't working

Comments

@perholmes
Copy link

perholmes commented May 26, 2023

We're having what might be the same problem as issue #1324, that Sentry has significant issues that prevent building an XCode project. This is both Sentry 1.2.0 and 1.3.0, using Unity 2023.1.0a25 and XCode 14.

We have found a workaround, but we don't know why it works.

Basically, whether or not iOS Native Support is enabled, XCode produces a bunch of link errors around SentryNativeBridge, such as linker errors for "_SentryNativeBridgeAddBreadcrumb". This error is coming from functionsin the Sentry.xcframework folder not being compiled.

Curiously, the Unity platform settings for SentryNativeBridge do not enable iOS. So we've had to embed Sentry into the Unity project to get to enable this. This gets us half of the way.

But more curiously, Sentry.xcframework~ has a tilde at the end, prevent everything in that folder from being visible to Unity, and these are the functions that are missing in the link. Removing the tilde, and instead also enabling iOS for Sentry.xcframework/ios-arm64/Sentry and Sentry.xcframework/Sentry.xcframework/ios-arm64/Sentry, it's now possible to complete an XCode build.

Clearly, whatever is in Sentry.xcframework~ is very important, and shouldn't be made hidden. But we can't see through why Sentry is designed this way. Do you have another way of enabling it for the XCode build that might be failing? This isn't a problem for Android builds.

That's what we know, but I would be great to understand what's going on here, and whether we're simply using it wrong.

@perholmes
Copy link
Author

Nope, didn't work when deployed on device. Some Sentry module missing.

I found that going back to 1.1.0, Sentry builds and works. So whatever broke is between 1.1.0 and 1.3.0. Version 1.2.0 worked on Android, Windows and Mac, so it has to be something iOS-specific that broke.

@bitsandfoxes
Copy link
Contributor

bitsandfoxes commented May 30, 2023

Thanks for the detailed report!
We have not looked into Unity 2023 so far as it's still a pre-release but it's a good call to stay ahead of this.
I'll try to reproduce this issue locally and then update here.
Could you provide the build logs with Debug Logging enabled and verbosity set to Debug?

@bitsandfoxes bitsandfoxes added Bug Something isn't working and removed Status: Untriaged labels May 30, 2023
@perholmes
Copy link
Author

A data point to keep in mind is that Sentry Unity 1.1.0 builds fine in the same Unity alpha. So I'm not 100% sure this is attributable to this being a pre-release Unity alpha.

I'm happy to provide a build log, but they're immense, and also a bit privileged, so I'd rather not post them in a public forum. Is there somewhere else I can send it?

@bitsandfoxes
Copy link
Contributor

I'm happy to provide a build log, but they're immense, and also a bit privileged, so I'd rather not post them in a public forum. Is there somewhere else I can send it?

Those would be highly appreciated. stefan@sentry.io

@bitsandfoxes
Copy link
Contributor

Apologies, this issue has not been properly linked to it's PR: #1352 has a fix has been release with 1.4.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants