get iOS device info

Hi there,

I’d like to make a test on a iDevice and fall back to a simple shader if the iDevice turned out not to be fast enough in testing.

enum IOSDevice
{
iPhone3G = 1,
iPhone3GS = 2,
iPhone4 = 3,
iPhone4S = 4
}

var material:Material;
var minimumRequiredIOSDevice:IOSDevice;

function Start()
{
	thisPhone=magic();
	if(thisPhone>=minimumRequiredIOSDevice)
	{
		renderer.material=material;
	}
}

what is the magic() i have to do? :slight_smile:

The magic would be to not do that at all but use the deviceType that unity offers out of the box to ask it what it is (anything beside iphone4s is covered in 3.4.x so if its 960x640 and not iphone4 and not itouch4 its iphone4s)

if you want to do it all yourself although its there already, you would have to use objc and the iOS SDK to ask about specific stuff