sentry-react-native icon indicating copy to clipboard operation
sentry-react-native copied to clipboard

Expose helper function to set `dist` to EAS Update ID

Open krystofwoldrich opened this issue 1 year ago • 0 comments

The helper could automatically resolve the dist when an EAS Update is detected, otherwise, the default value is used.

This simplifies the current init for Expo users.

import * as Updates from 'expo-updates';
import * as Sentry from '@sentry/react-native';

Sentry.init({
	dist: Updates.isEmbeddedLaunch
		? undefined // default from native will be used
		:  Updates.updateId,
});

krystofwoldrich avatar Feb 29 '24 15:02 krystofwoldrich