Closed gregersn closed 4 years ago
Hi @gregersn
Thanks for the report. This appears to be a bug, although we're already reworking this area in the next major version and this should be resolved by those changes.
In the short term you would have to ensure the CFBundleShortVersionString is also set to your app version to workaround this.
That is not really a viable option, since that would change what is presented to users in the app store. What is the time frame on the next major version?
@gregersn
We've had a closer look and can't see any difference between how the appVersion
is derived for sessions vs error reports. So we believe this may be related to the sequence of how you're initializing Bugsnag in the Javascript and native iOS layers in relation to where / when the session or error report is sent.
Can you share how you're configuring Bugsnag and whether you're using the enhanced native integration steps described here? https://docs.bugsnag.com/platforms/react-native/react-native/enhanced-native-integration/
If using the native integration it may be necessary to configure the appVersion
in the native configuration, as well as in the Javascript:
https://docs.bugsnag.com/platforms/react-native/react-native/enhanced-native-integration/#further-configuration
E.g.
#import "BugsnagConfiguration.h"
BugsnagConfiguration *config = [BugsnagConfiguration new];
config.appVersion = @"1.2.3";
[BugsnagReactNative startWithConfiguration:config];
We are using Swift here, but in Appdelegate.swift
I have
let config = BugsnagConfiguration()
config.appVersion = "1.2.3"
Bugsnag.start(with: config)
Are you also configuring the appVersion
in the Javascript config?
https://docs.bugsnag.com/platforms/react-native/react-native/configuration-options/
Closing for now as we're only able to reproduce by defining the appVersion
differently in the iOS vs Javascript configs.
If you're able to share a full reproduction example we'd be happy to take another look.
Description
I am trying to set a custom "appVersion" on crash reports
Issue
With Android everything seems to work fine. On iOS I get the overridden setting on sessions, but on crash reports, I get what
CFBundleShortVersionString
is set to inInfo.plist
Using bugsnag-react-native version 2.23.3