forked from Unity-Technologies/UnityCsReference
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathiOSDevice.bindings.cs
More file actions
145 lines (128 loc) · 4.96 KB
/
Copy pathiOSDevice.bindings.cs
File metadata and controls
145 lines (128 loc) · 4.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Unity C# reference source
// Copyright (c) Unity Technologies. For terms of use, see
// https://unity3d.com/legal/licenses/Unity_Reference_Only_License
using System;
using UnityEngine.Bindings;
namespace UnityEngine.iOS
{
// keep in sync with DeviceGeneration enum in trampoline.
public enum DeviceGeneration
{
Unknown = 0,
iPhone = 1,
iPhone3G = 2,
iPhone3GS = 3,
iPodTouch1Gen = 4,
iPodTouch2Gen = 5,
iPodTouch3Gen = 6,
iPad1Gen = 7,
iPhone4 = 8,
iPodTouch4Gen = 9,
iPad2Gen = 10,
iPhone4S = 11,
iPad3Gen = 12,
iPhone5 = 13,
iPodTouch5Gen = 14,
iPadMini1Gen = 15,
iPad4Gen = 16,
iPhone5C = 17,
iPhone5S = 18,
iPadAir1 = 19,
iPadMini2Gen = 20,
iPhone6 = 21,
iPhone6Plus = 22,
iPadMini3Gen = 23,
iPadAir2 = 24,
iPhone6S = 25,
iPhone6SPlus = 26,
iPadPro1Gen = 27,
iPadMini4Gen = 28,
iPhoneSE1Gen = 29,
iPadPro10Inch1Gen = 30,
iPhone7 = 31,
iPhone7Plus = 32,
iPodTouch6Gen = 33,
iPad5Gen = 34,
iPadPro2Gen = 35,
iPadPro10Inch2Gen = 36,
iPhone8 = 37,
iPhone8Plus = 38,
iPhoneX = 39,
iPhoneUnknown = 10001,
iPadUnknown = 10002,
iPodTouchUnknown = 10003,
}
public enum ActivityIndicatorStyle
{
DontShow = -1, // Do not show ActivityIndicator
WhiteLarge = 0, // The large white style of indicator (UIActivityIndicatorViewStyleWhiteLarge).
White = 1, // The standard white style of indicator (UIActivityIndicatorViewStyleWhite).
Gray = 2, // The standard gray style of indicator (UIActivityIndicatorViewStyleGray).
}
[NativeHeader("PlatformDependent/iPhonePlayer/IOSScriptBindings.h")]
public sealed partial class Device
{
extern public static string systemVersion
{
[FreeFunction("systeminfo::GetDeviceSystemVersion")]
get;
}
extern public static DeviceGeneration generation
{
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[FreeFunction("UnityDeviceGeneration")]
get;
}
extern public static string vendorIdentifier
{
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[FreeFunction("UnityVendorIdentifier")]
get;
}
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[FreeFunction("UnityAdvertisingIdentifier")]
extern private static string GetAdvertisingIdentifier();
public static string advertisingIdentifier
{
get
{
string advertisingId = GetAdvertisingIdentifier();
Application.InvokeOnAdvertisingIdentifierCallback(advertisingId, advertisingTrackingEnabled);
return advertisingId;
}
}
extern public static bool advertisingTrackingEnabled
{
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[FreeFunction("IOSScripting::IsAdvertisingTrackingEnabled")] get;
}
extern public static bool hideHomeButton
{
[NativeConditional("PLATFORM_IPHONE")]
[FreeFunction("IOSScripting::GetHideHomeButton")] get;
[NativeConditional("PLATFORM_IPHONE")]
[FreeFunction("IOSScripting::SetHideHomeButton")] set;
}
extern private static int deferSystemGesturesModeInternal
{
[NativeConditional("PLATFORM_IPHONE")]
[FreeFunction("IOSScripting::GetDeferSystemGesturesMode")] get;
[NativeConditional("PLATFORM_IPHONE")]
[FreeFunction("IOSScripting::SetDeferSystemGesturesMode")] set;
}
public static SystemGestureDeferMode deferSystemGesturesMode
{
get { return (SystemGestureDeferMode)deferSystemGesturesModeInternal; }
set { deferSystemGesturesModeInternal = (int)value; }
}
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[NativeMethod(Name = "IOSScripting::SetNoBackupFlag", IsFreeFunction = true, IsThreadSafe = true)]
extern public static void SetNoBackupFlag(string path);
[NativeConditional("PLATFORM_IPHONE || PLATFORM_TVOS")]
[NativeMethod(Name = "IOSScripting::ResetNoBackupFlag", IsFreeFunction = true, IsThreadSafe = true)]
extern public static void ResetNoBackupFlag(string path);
[NativeConditional("PLATFORM_IPHONE")]
[NativeMethod(Name = "IOSScripting::RequestStoreReview", IsFreeFunction = true, IsThreadSafe = true)]
extern public static bool RequestStoreReview();
}
}