using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using UnityEngine; #if UNITY_IOS public class PottingMobileUtilsiOS : PottingMobileUtilsBase { [DllImport("__Internal")] private static extern string GetCurrentNetworkState(); /// 获取设备IDFA [DllImport("__Internal")] private static extern string GetDeviceIDFA(); /// 获取设备IDFV [DllImport("__Internal")] private static extern string GetDeviceIDFV(); [DllImport("__Internal")] /// 是否是异形屏 private static extern bool IsAbnormityScreen(); [DllImport("__Internal")] /// 获取设备系统版本 private static extern string GetDeviceSystomVersion(); //获取网络商名称 [DllImport("__Internal")] private static extern string GetCarrierName(); [DllImport("__Internal")] private static extern string GetDeviceVersion(); [DllImport("__Internal")] private static extern string GetDeviceInfo(); /// /// 获取网络状态 /// public new static string _GetNetworkType() { return GetCurrentNetworkState(); } /// /// 获取设备id /// /// public new static string _GetDeviceId() { return GetDeviceIDFA(); } /// /// 获取iOS设备的IDFV,同一发布厂商在同设备下相同,卸载只不会改变 /// /// public new static string _iosGetDeviceIDFV() { return GetDeviceIDFA(); } /// /// 判断是否挖孔屏 /// /// public new static bool _HasNotchScreen() { return IsAbnormityScreen(); } /// /// 获取系统版本 /// /// public new static string _GetSystemVersion() { return GetDeviceSystomVersion(); } public new static string _GetSimOperatorByMnc() { return GetCarrierName(); } /// /// 获取手机型号 /// /// public new static string _GetModel() { return GetDeviceVersion(); } /// /// 获取手机信息字典 /// /// public new static string _GetDeviceInfo() { return GetDeviceInfo(); } } #endif