少年修仙传客户端代码仓库
MacBuilder
2018-08-23 d8632506ecea4a19a45ec67f0ec637d199b29534
Fixed IOS SDK 设备信息读取逻辑修改
1个文件已修改
23 ■■■■ 已修改文件
Core/SDK/SDKUtility.cs 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;