From d8632506ecea4a19a45ec67f0ec637d199b29534 Mon Sep 17 00:00:00 2001
From: MacBuilder <MacBuilder@secondworld.com>
Date: 星期四, 23 八月 2018 21:47:49 +0800
Subject: [PATCH] Fixed IOS SDK 设备信息读取逻辑修改

---
 Core/SDK/SDKUtility.cs |   23 +++++++++++------------
 1 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/Core/SDK/SDKUtility.cs b/Core/SDK/SDKUtility.cs
index 39f7d9c..906e78b 100644
--- a/Core/SDK/SDKUtility.cs
+++ b/Core/SDK/SDKUtility.cs
@@ -254,18 +254,17 @@
         var _code = (int)_json["code"];
         switch (_code)
         {
-            case CodeA2U.DeviceInfo:
+			case CodeA2U.DeviceInfo:
 
-                Device = new DeviceInfo
-                {
-                    imei = _json["imei"].ToString(),
-                    uniqueID = _json["unique_id"].ToString(),
-                    macAddress = _json["mac"].ToString(),
-                    androidID = _json["android_id"].ToString(),
-                    userAgent = _json["userAgent"].ToString(),
-                    totalMemory = (int)_json["memoryTotal"]
-                };
-
+				Device = new DeviceInfo ();
+				Device.uniqueID = _json ["unique_id"].ToString ();
+				Device.androidID = _json ["android_id"].ToString ();// ios骞冲彴涓嬩负idfa
+				Device.userAgent = _json ["userAgent"].ToString ();
+#if UNITY_ANDROID
+				Device.macAddress = _json ["mac"].ToString ();
+				Device.imei = _json ["imei"].ToString ();
+				Device.totalMemory = (int)_json ["memoryTotal"];
+#endif
                 if (OnDeviceInfoChanged != null)
                 {
                     OnDeviceInfoChanged(Device);
@@ -491,7 +490,7 @@
 
     #endregion
 
-    public struct DeviceInfo
+    public class DeviceInfo
     {
         public string imei;
         public string macAddress;

--
Gitblit v1.8.0