Skip to content

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

@jtomanik

Description

@jtomanik

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:

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Needs Discussion

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions