device_metrics.m 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. /**************************************************************************/
  2. /* device_metrics.m */
  3. /**************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /**************************************************************************/
  8. /* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
  9. /* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /**************************************************************************/
  30. #import "device_metrics.h"
  31. @implementation GodotDeviceMetrics
  32. + (NSDictionary *)dpiList {
  33. return @{
  34. @[
  35. @"iPad1,1", // iPad 1th Gen
  36. @"iPad1,2", // iPad 1th Gen (3G)
  37. @"iPad2,1", // iPad 2nd Gen
  38. @"iPad2,2", // iPad 2nd Gen (GSM)
  39. @"iPad2,3", // iPad 2nd Gen (CDMA)
  40. @"iPad2,4", // iPad 2nd Gen
  41. ] : @132,
  42. @[
  43. @"iPhone1,1", // iPhone 1st Gen
  44. @"iPhone1,2", // iPhone 3G
  45. @"iPhone2,1", // iPhone 3GS
  46. @"iPad2,5", // iPad mini
  47. @"iPad2,6", // iPad mini (GSM+LTE)
  48. @"iPad2,7", // iPad mini (CDMA+LTE)
  49. @"iPod1,1", // iPod 1st Gen
  50. @"iPod2,1", // iPod 2nd Gen
  51. @"iPod3,1", // iPod 3rd Gen
  52. ] : @163,
  53. @[
  54. @"iPad3,1", // iPad 3rd Gen
  55. @"iPad3,2", // iPad 3rd Gen (CDMA)
  56. @"iPad3,3", // iPad 3rd Gen (GSM)
  57. @"iPad3,4", // iPad 4th Gen
  58. @"iPad3,5", // iPad 4th Gen (GSM+LTE)
  59. @"iPad3,6", // iPad 4th Gen (CDMA+LTE)
  60. @"iPad4,1", // iPad Air (WiFi)
  61. @"iPad4,2", // iPad Air (GSM+CDMA)
  62. @"iPad4,3", // iPad Air (China)
  63. @"iPad4,7", // iPad mini 3 (WiFi)
  64. @"iPad4,8", // iPad mini 3 (GSM+CDMA)
  65. @"iPad4,9", // iPad Mini 3 (China)
  66. @"iPad6,3", // iPad Pro (9.7 inch, WiFi)
  67. @"iPad6,4", // iPad Pro (9.7 inch, WiFi+LTE)
  68. @"iPad6,7", // iPad Pro (12.9 inch, WiFi)
  69. @"iPad6,8", // iPad Pro (12.9 inch, WiFi+LTE)
  70. @"iPad6,11", // iPad 5th Gen (2017)
  71. @"iPad6,12", // iPad 5th Gen (2017)
  72. @"iPad7,1", // iPad Pro 2nd Gen (WiFi)
  73. @"iPad7,2", // iPad Pro 2nd Gen (WiFi+Cellular)
  74. @"iPad7,3", // iPad Pro 10.5-inch 2nd Gen
  75. @"iPad7,4", // iPad Pro 10.5-inch 2nd Gen
  76. @"iPad7,5", // iPad 6th Gen (WiFi)
  77. @"iPad7,6", // iPad 6th Gen (WiFi+Cellular)
  78. @"iPad7,11", // iPad 7th Gen 10.2-inch (WiFi)
  79. @"iPad7,12", // iPad 7th Gen 10.2-inch (WiFi+Cellular)
  80. @"iPad8,1", // iPad Pro 11 inch 3rd Gen (WiFi)
  81. @"iPad8,2", // iPad Pro 11 inch 3rd Gen (1TB, WiFi)
  82. @"iPad8,3", // iPad Pro 11 inch 3rd Gen (WiFi+Cellular)
  83. @"iPad8,4", // iPad Pro 11 inch 3rd Gen (1TB, WiFi+Cellular)
  84. @"iPad8,5", // iPad Pro 12.9 inch 3rd Gen (WiFi)
  85. @"iPad8,6", // iPad Pro 12.9 inch 3rd Gen (1TB, WiFi)
  86. @"iPad8,7", // iPad Pro 12.9 inch 3rd Gen (WiFi+Cellular)
  87. @"iPad8,8", // iPad Pro 12.9 inch 3rd Gen (1TB, WiFi+Cellular)
  88. @"iPad8,9", // iPad Pro 11 inch 4th Gen (WiFi)
  89. @"iPad8,10", // iPad Pro 11 inch 4th Gen (WiFi+Cellular)
  90. @"iPad8,11", // iPad Pro 12.9 inch 4th Gen (WiFi)
  91. @"iPad8,12", // iPad Pro 12.9 inch 4th Gen (WiFi+Cellular)
  92. @"iPad11,3", // iPad Air 3rd Gen (WiFi)
  93. @"iPad11,4", // iPad Air 3rd Gen
  94. @"iPad11,6", // iPad 8th Gen (WiFi)
  95. @"iPad11,7", // iPad 8th Gen (WiFi+Cellular)
  96. @"iPad12,1", // iPad 9th Gen (WiFi)
  97. @"iPad12,2", // iPad 9th Gen (WiFi+Cellular)
  98. @"iPad13,1", // iPad Air 4th Gen (WiFi)
  99. @"iPad13,2", // iPad Air 4th Gen (WiFi+Cellular)
  100. @"iPad13,4", // iPad Pro 11 inch 5th Gen
  101. @"iPad13,5", // iPad Pro 11 inch 5th Gen
  102. @"iPad13,6", // iPad Pro 11 inch 5th Gen
  103. @"iPad13,7", // iPad Pro 11 inch 5th Gen
  104. @"iPad13,8", // iPad Pro 12.9 inch 5th Gen
  105. @"iPad13,9", // iPad Pro 12.9 inch 5th Gen
  106. @"iPad13,10", // iPad Pro 12.9 inch 5th Gen
  107. @"iPad13,11", // iPad Pro 12.9 inch 5th Gen
  108. @"iPad13,16", // iPad Air 5th Gen (WiFi)
  109. @"iPad13,17", // iPad Air 5th Gen (WiFi+Cellular)
  110. @"iPad13,18", // iPad 10th Gen
  111. @"iPad13,19", // iPad 10th Gen
  112. @"iPad14,3", // iPad Pro 11 inch 6th Gen
  113. @"iPad14,4", // iPad Pro 11 inch 6th Gen
  114. @"iPad14,5", // iPad Pro 12.9 inch 6th Gen
  115. @"iPad14,6", // iPad Pro 12.9 inch 6th Gen
  116. ] : @264,
  117. @[
  118. @"iPhone3,1", // iPhone 4
  119. @"iPhone3,2", // iPhone 4 (GSM)
  120. @"iPhone3,3", // iPhone 4 (CDMA)
  121. @"iPhone4,1", // iPhone 4S
  122. @"iPhone5,1", // iPhone 5 (GSM)
  123. @"iPhone5,2", // iPhone 5 (GSM+CDMA)
  124. @"iPhone5,3", // iPhone 5C (GSM)
  125. @"iPhone5,4", // iPhone 5C (Global)
  126. @"iPhone6,1", // iPhone 5S (GSM)
  127. @"iPhone6,2", // iPhone 5S (Global)
  128. @"iPhone7,2", // iPhone 6
  129. @"iPhone8,1", // iPhone 6s
  130. @"iPhone8,4", // iPhone SE (GSM)
  131. @"iPhone9,1", // iPhone 7
  132. @"iPhone9,3", // iPhone 7
  133. @"iPhone10,1", // iPhone 8
  134. @"iPhone10,4", // iPhone 8
  135. @"iPhone11,8", // iPhone XR
  136. @"iPhone12,1", // iPhone 11
  137. @"iPhone12,8", // iPhone SE 2nd gen
  138. @"iPhone14,6", // iPhone SE 3rd gen
  139. @"iPad4,4", // iPad mini Retina (WiFi)
  140. @"iPad4,5", // iPad mini Retina (GSM+CDMA)
  141. @"iPad4,6", // iPad mini Retina (China)
  142. @"iPad5,1", // iPad mini 4th Gen (WiFi)
  143. @"iPad5,2", // iPad mini 4th Gen
  144. @"iPad5,3", // iPad Air 2 (WiFi)
  145. @"iPad5,4", // iPad Air 2
  146. @"iPad11,1", // iPad mini 5th Gen (WiFi)
  147. @"iPad11,2", // iPad mini 5th Gen
  148. @"iPad14,1", // iPad mini 6th Gen (WiFi)
  149. @"iPad14,2", // iPad mini 6th Gen
  150. @"iPod4,1", // iPod 4th Gen
  151. @"iPod5,1", // iPod 5th Gen
  152. @"iPod7,1", // iPod 6th Gen
  153. @"iPod9,1", // iPod 7th Gen
  154. ] : @326,
  155. @[
  156. @"iPhone7,1", // iPhone 6 Plus
  157. @"iPhone8,2", // iPhone 6s Plus
  158. @"iPhone9,2", // iPhone 7 Plus
  159. @"iPhone9,4", // iPhone 7 Plus
  160. @"iPhone10,2", // iPhone 8 Plus
  161. @"iPhone10,5", // iPhone 8 Plus
  162. ] : @401,
  163. @[
  164. @"iPhone10,3", // iPhone X Global
  165. @"iPhone10,6", // iPhone X GSM
  166. @"iPhone11,2", // iPhone XS
  167. @"iPhone11,4", // iPhone XS Max
  168. @"iPhone11,6", // iPhone XS Max Global
  169. @"iPhone12,3", // iPhone 11 Pro
  170. @"iPhone12,5", // iPhone 11 Pro Max
  171. @"iPhone13,4", // iPhone 12 Pro Max
  172. @"iPhone14,3", // iPhone 13 Pro Max
  173. @"iPhone14,8", // iPhone 14 Plus
  174. ] : @458,
  175. @[
  176. @"iPhone13,2", // iPhone 12
  177. @"iPhone13,3", // iPhone 12 Pro
  178. @"iPhone14,2", // iPhone 13 Pro
  179. @"iPhone14,5", // iPhone 13
  180. @"iPhone14,7", // iPhone 14
  181. @"iPhone15,2", // iPhone 14 Pro
  182. @"iPhone15,3", // iPhone 14 Pro Max
  183. ] : @460,
  184. @[
  185. @"iPhone13,1", // iPhone 12 Mini
  186. @"iPhone14,4", // iPhone 13 Mini
  187. ] : @476
  188. };
  189. }
  190. @end