iOS Devices

From Graal Bible

The following is a list of released iOS devices. Devices with multiple model identifiers are identical devices except for some internal detail, such as the type of radio. GSM denotes that the device uses an AT&T-style radio, whereas CDMA indicates a Verizon-style radio.

Name Description Model Identifier
iPad Original iPad. Faster than all devices prior to the iPad 2. iPad1,1 (for both WiFi and 3G models)
iPad 2 Second iPad. Faster than all other iOS devices. iPad2,1 (WiFi), iPad2,2 (GSM), iPad2,3 (CDMA)
iPhone Original iPhone iPhone1,1
iPhone 3G Same processor as original iPhone1,2
iPhone 3GS Faster than 3G and iPod touch 2G iPhone2,1
iPhone 4 Faster than all other iPhones. Roughly equal to iPad. iPhone3,1 (GSM), iPhone3,3 (CDMA)
iPod Touch Original iPod Touch, roughly equal to orignal iPhone iPod1,1
iPod Touch (2nd gen) Faster than iPhone 3G and original iPod Touch iPod2,1
iPod Touch (3rd gen) Roughly as fast as iPhone 3GS iPod3,1
iPod Touch (4th gen) Same processor as iPhone 4, retina display iPod4,1

This site is useful in looking up model IDs for Apple devices.

GScript

iOS device identifiers can be retrieved by using the clientside function getiPhoneModel.

temp.deviceID = getiPhoneModel();
player.chat = temp.deviceID;

Device Tiers

It is useful to split devices into tiers so that effects which may not be possible on older devices can still be used on new ones. The following code can be used to determine a device tier:

public function getDeviceTier() {
  temp.deviceID = getiPhoneModel();
  
  if (temp.deviceID in {"iPod1,1", "iPhone1,1", "iPhone1,2"}) {
    return 0;
  }
  
  if (temp.deviceID in {"iPod2,1", "iPhone2,1", "iPod3,1"}) {
    return 1;
  }
  
  if (temp.deviceID in {"iPhone3,1", "iPhone3,3", "iPod4,1", "iPad1,1"}) {
    return 2;
  }
  
  if (temp.deviceID in {"iPad2,1", "iPad2,2", "iPad2,3"}) {
    return 3;
  }
  
  return 999; // computers or unknown devices
}