Skip to content

Commit 973722a

Browse files
committed
新增 Device.GetIOSVersion
1 parent a5e2b8f commit 973722a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Plugins/CS/Device.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ public static class Device
3535
[DllImport("__Internal")]
3636
static extern string Device_GetCountryCode();
3737

38+
public static Version GetIOSVersion()
39+
{
40+
if(Version.TryParse(UnityEngine.iOS.Device.systemVersion, out var iOSVersion))
41+
return iOSVersion;
42+
return new Version(0, 0);
43+
}
44+
3845
/// <summary>
3946
/// 是否是 iPhone 刘海屏
4047
/// </summary>

0 commit comments

Comments
 (0)