App.xml Stub File

If you’ve ever created an AIR for Mobile project, you’ll know that the default -app.xml file provided is pretty gross. Everytime I start a new project I hit this same issue, and have to clean out all the junk, so this is mainly a reference for myself :)

Here’s a nice stub with just the bare essentials for an iOS and Android App:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/3.2">
 
	<id>APP_ID</id>
	<filename>APP_NAME</filename>
	<name>APP_NAME</name>
	<versionNumber>0.0.1</versionNumber>
 
	<initialWindow>
	    <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
	    <visible>true</visible>
	    <!-- <aspectRatio>landscape</aspectRatio> -->
	    <autoOrients>true</autoOrients>
	    <fullScreen>true</fullScreen>
	    <renderMode>gpu</renderMode>
	</initialWindow>
 
<!--
	<icon>
	    <image57x57>/assets/icons/icon-57.png</image57x57>
	    <image72x72>/assets/icons/icon-72.png</image72x72>
	    <image114x114>/assets/icons/icon-57@2x.png</image114x114>
	</icon>
-->
 
	<iPhone>
        <InfoAdditions><![CDATA[
		<key>UIDeviceFamily</key>
		<array>
			<string>1</string>
			<string>2</string>
		</array>
		<key>UIPrerenderedIcon</key>
		<true/>
	]]></InfoAdditions>
        <requestedDisplayResolution>high</requestedDisplayResolution>
    	</iPhone>
 
    	<android>
        <manifestAdditions><![CDATA[
		<manifest android:installLocation="preferExternal">
			<uses-sdk android:targetSdkVersion="11"/> <!-- Prevents certain bugs on Android 4.0 -->
			<uses-permission android:name="android.permission.INTERNET"/>
 		</manifest>
	]]>
	</manifestAdditions>
    	</android>
 
</application>

The file contains Retina support for iOS, Internet Permission for Android debugging, and the 3 icon sizes you’ll need.

Written by

No Comments Yet.

Leave a Reply

Message