Skip to main content

Get device model identifier (device.type)

Declaration

type = device.type()

Returns

  • type
    String. Device model identifier, like "iPhone3,1"

Notes

Get the device type
This function can be used in XUI

Example

if device.type() == "iPhone3,1" then
-- iPhone 4
end