File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
test/react-native/features/fixtures/scenario-launcher/lib Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,16 @@ const PERSISTED_STATE_DIRECTORY = `${Dirs.CacheDir}/bugsnag-performance-react-na
55const PERSISTED_STATE_PATH = `${ PERSISTED_STATE_DIRECTORY } /persisted-state.json`
66const RETRY_QUEUE_DIRECTORY = `${ PERSISTED_STATE_DIRECTORY } /retry-queue`
77
8+ function getNativeDeviceIdFilePath ( ) {
9+ const nativeDeviceIdFilePath = Platform . select ( {
10+ ios : undefined ,
11+ android : `${ Dirs . DocumentDir } /device-id` ,
12+ default : undefined
13+ } )
14+
15+ return nativeDeviceIdFilePath
16+ }
17+
818async function writePersistedStateFile ( contents ) {
919 if ( ! await FileSystem . exists ( PERSISTED_STATE_DIRECTORY ) ) {
1020 console . error ( `[BugsnagPerformance] creating persisted state directory: ${ PERSISTED_STATE_DIRECTORY } ` )
@@ -43,4 +53,9 @@ export async function clearPersistedState() {
4353 await FileSystem . unlink ( `${ RETRY_QUEUE_DIRECTORY } /${ file } ` )
4454 }
4555 }
56+ const nativeDeviceIdFilePath = getNativeDeviceIdFilePath ( )
57+ if ( await FileSystem . exists ( nativeDeviceIdFilePath ) ) {
58+ console . error ( `[BugsnagPerformance] Clearing persisted data at path: ${ nativeDeviceIdFilePath } ` )
59+ await FileSystem . unlink ( nativeDeviceIdFilePath )
60+ }
4661}
You can’t perform that action at this time.
0 commit comments