1 /******************************************************************************* 2 * Copyright 2011 See AUTHORS file. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ******************************************************************************/ 16 17 package com.badlogic.gdx.backends.iosmoe; 18 19 public enum IOSDevice { 20 21 IPHONE_2G("iPhone1,1", 163), 22 IPHONE_3G("iPhone1,2", 163), 23 IPHONE_3GS("iPhone2,1", 163), 24 IPHONE_4("iPhone3,1", 326), 25 IPHONE_4V("iPhone3,2", 326), 26 IPHONE_4_CDMA("iPhone3,3", 326), 27 IPHONE_4S("iPhone4,1", 326), 28 IPHONE_5("iPhone5,1", 326), 29 IPHONE_5_CDMA_GSM("iPhone5,2", 326), 30 IPHONE_5C("iPhone5,3", 326), 31 IPHONE_5C_CDMA_GSM("iPhone5,4", 326), 32 IPHONE_5S("iPhone6,1", 326), 33 IPHONE_5S_CDMA_GSM("iPhone6,2", 326), 34 IPHONE_6_PLUS("iPhone7,1", 401), 35 IPHONE_6("iPhone7,2", 326), 36 IPHONE_6S("iPhone8,1", 326), 37 IPHONE_6S_PLUS("iPhone8,2", 401), 38 39 IPOD_TOUCH_1G("iPod1,1", 163), 40 IPOD_TOUCH_2G("iPod2,1", 163), 41 IPOD_TOUCH_3G("iPod3,1", 163), 42 IPOD_TOUCH_4G("iPod4,1", 326), 43 IPOD_TOUCH_5G("iPod5,1", 326), 44 IPOD_TOUCH_6G("iPod7,1", 326), 45 46 IPAD("iPad1,1", 132), 47 IPAD_3G("iPad1,2", 132), 48 IPAD_2_WIFI("iPad2,1", 132), 49 IPAD_2("iPad2,2", 132), 50 IPAD_2_CDMA("iPad2,3", 132), 51 IPAD_2V("iPad2,4", 132), 52 IPAD_MINI_WIFI("iPad2,5", 164), 53 IPAD_MINI("iPad2,6", 164), 54 IPAD_MINI_WIFI_CDMA("iPad2,7", 164), 55 IPAD_3_WIFI("iPad3,1", 264), 56 IPAD_3_WIFI_CDMA("iPad3,2", 264), 57 IPAD_3("iPad3,3", 264), 58 IPAD_4_WIFI("iPad3,4", 264), 59 IPAD_4("iPad3,5", 264), 60 IPAD_4_GSM_CDMA("iPad3,6", 264), 61 IPAD_AIR_WIFI("iPad4,1", 264), 62 IPAD_AIR_WIFI_GSM("iPad4,2", 264), 63 IPAD_AIR_WIFI_CDMA("iPad4,3", 264), 64 IPAD_MINI_RETINA_WIFI("iPad4,4", 326), 65 IPAD_MINI_RETINA_WIFI_CDMA("iPad4,5", 326), 66 IPAD_MINI_RETINA_WIFI_CELLULAR_CN("iPad4,6", 326), 67 IPAD_MINI_3_WIFI("iPad4,7", 326), 68 IPAD_MINI_3_WIFI_CELLULAR("iPad4,8", 326), 69 IPAD_MINI_3_WIFI_CELLULAR_CN("iPad4,9", 326), 70 IPAD_MINI_4_WIFI("iPad5,1", 326), 71 IPAD_MINI_4_WIFI_CELLULAR("iPad5,2", 326), 72 IPAD_MINI_AIR_2_WIFI("iPad5,3", 264), 73 IPAD_MINI_AIR_2_WIFI_CELLULAR("iPad5,4", 264), 74 IPAD_PRO_WIFI("iPad6,7", 264), 75 IPAD_PRO("iPad6,8", 264), 76 77 SIMULATOR_32("i386", 264), 78 SIMULATOR_64("x86_64", 264); 79 80 final String machineString; 81 final int ppi; 82 83 IOSDevice(String machineString, int ppi) { 84 this.machineString = machineString; 85 this.ppi = ppi; 86 } 87 88 public static IOSDevice getDevice (String machineString) { 89 for (IOSDevice device : values()) { 90 if (device.machineString.equalsIgnoreCase(machineString)) return device; 91 } 92 return null; 93 } 94 95 96 } 97