Skip to content

Instantly share code, notes, and snippets.

@charleehu
Created July 3, 2012 06:08
Show Gist options
  • Save charleehu/3038000 to your computer and use it in GitHub Desktop.
Save charleehu/3038000 to your computer and use it in GitHub Desktop.
ant script for ios air app package
#Native iOS Extension app
app.rootdir=.
app.sourcedir=${app.rootdir}/src
app.builddir=${app.rootdir}/build
app.releasedir=${app.rootdir}/release
app.extensions_dir=${app.rootdir}/extensions
build.storetype=pkcs12
build.keystore=${app.rootdir}/app_signing/iOS/dev.p12
build.storepass=123456
build.mobileprofile=${app.rootdir}/app_signing/iOS/RenrenGameCommon_dev.mobileprovision
build.name=AIRPush.ipa
build.swfname=APNServiceApp.swf
build.appDescriptor=Demo-app.xml
app.descriptor=${app.rootdir}/src/${build.appDescriptor}
<?xml version="1.0" encoding="UTF-8"?>
<project name="Apple Push Notifications Service native extension for Adobe AIR example application" default="publish-ios" basedir=".">
<property file="local.properties" />
<property file="build.properties" />
<target name="clean">
<delete dir="${app.builddir}"/>
<delete dir="${app.releasedir}"/>
<mkdir dir="${app.builddir}"/>
<mkdir dir="${app.releasedir}"/>
</target>
<target name="copy" depends="clean">
<copy todir="${app.builddir}" preservelastmodified="true" verbose="true">
<fileset dir="${app.sourcedir}">
<patternset>
<include name="assets/**"/>
<include name="*.png"/>
<include name="*.xml"/>
<include name="*.ane"/>
</patternset>
</fileset>
</copy>
</target>
<target name="compile" depends="copy">
<exec executable="${MXMLC}">
<arg line="
+configname=airmobile
-output ${app.builddir}/${build.swfname}
${app.sourcedir}/Demo.mxml
-source-path+=${app.rootdir}/src
-load-config+=Demo_app.config
-swf-version=14
"/>
</exec>
</target>
<target name="publish-ios" depends="compile">
<copy file="${app.builddir}/${build.swfname}" tofile="${app.rootdir}/${build.swfname}"/>
<copy file="${app.sourcedir}/${build.appDescriptor}" tofile="${app.rootdir}/${build.appDescriptor}"/>
<exec executable="${ADT}">
<arg line="-package
-target ipa-test-interpreter
-provisioning-profile ${build.mobileprofile}
-storetype ${build.storetype}
-keystore ${build.keystore}
-storepass ${build.storepass}
${app.releasedir}/${build.name}
${app.descriptor}
${build.swfname}
-extdir extensions
-C ${app.builddir} Default.png [email protected]"/>
</exec>
</target>
</project>
FLEX_HOME=/Applications/Adobe\ Flash\ Builder\ 4.6/sdks/4.6.0
MXMLC=${FLEX_HOME}/bin/mxmlc
COMPC=${FLEX_HOME}/bin/compc
ACOMPC=${FLEX_HOME}/bin/acompc
ADT=${FLEX_HOME}/bin/adt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment