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

On iOS default release version is cleared when no release is set on the Kotlin Multiplatform side. #337

Open
jtomanik opened this issue Feb 17, 2025 · 0 comments
Labels
Platform: KMP Type: Bug Something isn't working

Comments

@jtomanik
Copy link

Platform

Apple

Installed

Swift Package Manager

Version

8.42.0

Steps to Reproduce

  1. Do not set release property in SentryOptions in the shared code on Kotlin Multiplatform side
  2. Set properly CFBundleIdentifier, CFBundleShortVersionString, and CFBundleVersion in info.plist in the xcode project used with kotlin multi-platform
  3. Send any kind of event to Sentry (including a crash)
  4. When checking event / issue it has no associated release

Expected Result

According to the kotlin multiplatform SDK documentation:

release
Sets the release. Some SDKs will try to automatically configure a release out of the box

Then according to the iOS SDK documentation:

Setting a Release
If no release name is set, the SDK creates a default combined from CFBundleIdentifier, CFBundleShortVersionString, and CFBundleVersion, for example [email protected]+1234.

Which implies that when no release is set up on the Kotlin Multiplatform side that value will default to whatever platform's SDK behaviour.
In case of iOS that should be a value based on CFBundleIdentifier, CFBundleShortVersionString, and CFBundleVersion values.

Actual Result

Right now the release value transmitted to the sentry backend is null by default.

This is most likely caused by overriding the platform's default value here:

without checking if there is any value in kmpEvent as it is done for some other fields:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: KMP Type: Bug Something isn't working
Projects
Status: Needs Discussion
Development

No branches or pull requests

1 participant