@umituz/react-native-design-system 2.9.21 → 2.9.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-design-system",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.22",
|
|
4
4
|
"description": "Universal design system for React Native apps - Consolidated package with atoms, molecules, organisms, theme, typography, responsive, safe area, exception, infinite scroll, UUID, image, timezone, offline, onboarding, and loading utilities",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -12,6 +12,7 @@ import { Dimensions } from 'react-native';
|
|
|
12
12
|
import * as Localization from 'expo-localization';
|
|
13
13
|
import { DeviceInfoService } from './DeviceInfoService';
|
|
14
14
|
import { ApplicationInfoService } from './ApplicationInfoService';
|
|
15
|
+
import { DeviceIdService } from './DeviceIdService';
|
|
15
16
|
import { PersistentDeviceIdService } from './PersistentDeviceIdService';
|
|
16
17
|
|
|
17
18
|
/**
|
|
@@ -21,7 +22,12 @@ import { PersistentDeviceIdService } from './PersistentDeviceIdService';
|
|
|
21
22
|
*/
|
|
22
23
|
export interface DeviceExtras {
|
|
23
24
|
[key: string]: string | number | boolean | undefined;
|
|
25
|
+
/** The stable ID stored in Keychain/SecureStore */
|
|
24
26
|
deviceId?: string;
|
|
27
|
+
/** Alias for deviceId for clarity in Firestore */
|
|
28
|
+
persistentDeviceId?: string;
|
|
29
|
+
/** The raw native platform ID (IDFV on iOS, Android ID on Android) */
|
|
30
|
+
nativeDeviceId?: string;
|
|
25
31
|
platform?: string;
|
|
26
32
|
deviceModel?: string;
|
|
27
33
|
deviceBrand?: string;
|
|
@@ -77,10 +83,11 @@ function getDeviceLocale(): string | undefined {
|
|
|
77
83
|
*/
|
|
78
84
|
export async function collectDeviceExtras(): Promise<DeviceExtras> {
|
|
79
85
|
try {
|
|
80
|
-
const [deviceInfo, appInfo, deviceId] = await Promise.all([
|
|
86
|
+
const [deviceInfo, appInfo, deviceId, nativeDeviceId] = await Promise.all([
|
|
81
87
|
DeviceInfoService.getDeviceInfo(),
|
|
82
88
|
ApplicationInfoService.getApplicationInfo(),
|
|
83
89
|
PersistentDeviceIdService.getDeviceId(),
|
|
90
|
+
DeviceIdService.getDeviceId(),
|
|
84
91
|
]);
|
|
85
92
|
|
|
86
93
|
const locale = getDeviceLocale();
|
|
@@ -88,6 +95,8 @@ export async function collectDeviceExtras(): Promise<DeviceExtras> {
|
|
|
88
95
|
|
|
89
96
|
return {
|
|
90
97
|
deviceId,
|
|
98
|
+
persistentDeviceId: deviceId, // Explicitly named for Firestore clarity
|
|
99
|
+
nativeDeviceId: nativeDeviceId || undefined,
|
|
91
100
|
platform: deviceInfo.platform,
|
|
92
101
|
deviceModel: deviceInfo.modelName || undefined,
|
|
93
102
|
deviceBrand: deviceInfo.brand || undefined,
|