diff --git a/Runtime/GuruCore/Runtime/IPM/Scripts/DeviceUtil.cs b/Runtime/GuruCore/Runtime/IPM/Scripts/DeviceUtil.cs
index cf29501..96d4b8f 100644
--- a/Runtime/GuruCore/Runtime/IPM/Scripts/DeviceUtil.cs
+++ b/Runtime/GuruCore/Runtime/IPM/Scripts/DeviceUtil.cs
@@ -88,7 +88,6 @@ namespace Guru
if(!string.IsNullOrEmpty(content))
{
string[] infos = content.Split('$');
- IPMConfig.IPM_DEVICE_ID = SystemInfo.deviceUniqueIdentifier;
IPMConfig.IPM_BRAND = infos[0];
IPMConfig.IPM_LANGUAGE = infos[1];
IPMConfig.IPM_MODEL = infos[2];
diff --git a/Runtime/GuruCore/Runtime/IPM/Scripts/IPMConfig.cs b/Runtime/GuruCore/Runtime/IPM/Scripts/IPMConfig.cs
index ca47d8d..0eab7c4 100644
--- a/Runtime/GuruCore/Runtime/IPM/Scripts/IPMConfig.cs
+++ b/Runtime/GuruCore/Runtime/IPM/Scripts/IPMConfig.cs
@@ -28,7 +28,6 @@ namespace Guru
public static readonly string POST_Param_TokenSecret = "tokenSecret";
public static string IPM_APP_PACKAGE_NAME = Application.identifier;
- public static string IPM_DEVICE_ID = SystemInfo.deviceUniqueIdentifier;
public static string IPM_APP_VERSION = Application.version;
public static string IPM_IOS_APP_GROUP = "group." + Application.identifier;
public static string IPM_BRAND = "";
@@ -39,6 +38,29 @@ namespace Guru
public static string IPM_COUNTRY_CODE = RegionInfo.CurrentRegion.TwoLetterISORegionName;
public static bool IPM_NEWUSER = true;
+ ///
+ /// 中台设备 ID
+ ///
+ public static string IPM_DEVICE_ID
+ {
+ get
+ {
+ if (string.IsNullOrEmpty(SavedDeviceId))
+ {
+ SavedDeviceId = SystemInfo.deviceUniqueIdentifier; // 目前使用 UNITY 接口来生成对应的 DeviceID
+ }
+ return SavedDeviceId; // 优先使用缓存的 DeviceID
+ }
+ }
+ ///
+ /// 缓存设备 ID
+ ///
+ private static string SavedDeviceId
+ {
+ get => PlayerPrefs.GetString(nameof(SavedDeviceId), "");
+ set => PlayerPrefs.SetString(nameof(SavedDeviceId), value);
+ }
+
#if DEBUG
public static readonly string IPM_URL = "https://dev.saas.castbox.fm/";
#else