<doc>
	<legacy_id>2286</legacy_id>
	<name>machine</name>
	<type>function</type>

	<syntax>
		<example>the machine</example>
		<example>machine()</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary><glossary tag="return">Returns</glossary> the type of hardware the <glossary tag="application">application</glossary> is running on.</summary>

	<examples>
<example>the machine</example>
<example>if the machine contains &quot;Powerbook&quot; then checkBattery</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.5.2">iOS support added</changed>
<changed version="4.6.1">Android support added</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>The System Environment</category>
	</classification>

	<references>
		<function tag="processor">processor Function</function>
	</references>

	<description>
	<overview>Use the <b>machine</b> function to detect what type of system your application is running on.</overview>

		<parameters>
		</parameters>

	<value>The <b>machine</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> a <keyword tag="string">string</keyword>.<p></p><p>* x86 - windows based system</p><p>* iPod Touch - the device is one of the iPod Touch models</p><p>* iPhone - the device is one of the iPhone models</p><p>* iPhone Simulator - the device is a simulated iPhone</p><p>* iPad - the device is the iPad</p><p>* iPad Simulator - the device is a simulator iPad</p></value>
	<comments>On Mac OS systems, the <b>machine</b> <control_st tag="function">function</control_st> uses the Gestalt() system call to determine the machine type.<p></p><p>On Unix systems, the <b>machine</b> <control_st tag="function">function</control_st> uses the uname() system function.</p><p></p><p>On Android devices, the <b>machine</b> <control_st tag="function">function</control_st> returns the manufacturer's name for the device. For example, if running on a Google Nexus One, the string is &quot;Nexus One&quot;.</p></comments>
	</description>
</doc>