bugsnag / bugsnag-expo

MIT License
11 stars 5 forks source link

[PLAT-9224] Add app.versionCode/app.bundleVersion metadata and add codeBundleId config option #92

Closed yousif-bugsnag closed 1 year ago

yousif-bugsnag commented 1 year ago

Goal

To fix a source map matching bug on Android when using EAS Build, and improve support for EAS Update by exposing the codeBundleId config option

Design

app.versionCode (Android) and app.bundleVersion (iOS) metadata has been added to both events and sessions for standalone apps using Application.nativeBuildVersion from expo-application.

This fixes a source map matching bug for EAS Build on Android which occurs because the native build specifies versionCode on the source map upload. For consistency, automatic source map uploads on iOS have also been updated to specify a bundleVersion.

This also fixes a bug which means that the existing nativeVersionCode and nativeBundleVersion metadata is not set when using EAS Build due to Constants.appOwnership now returning null for standalone apps. These metadata properties will be removed in the next major version of the notifier.

codeBundleId is now available as a configuration option in order to improve support for matching source maps when using EAS Update. This allows developers to use updateGroup ID provided by EAS Update to configure a codeBundleId both in the notifier config and for manual source map uploads.

Changeset

Testing