Game Development Reference
In-Depth Information
return new IOSApplication(new MyDemo(), config);
}
public static void main(String[] argv) {
NSAutoreleasePool pool = new NSAutoreleasePool();
UIApplication.main(argv, null, RobovmLauncher.class);
pool.close();
}
}
In the preceding code, you can see the RobovmLauncher class that is inherited from
the IOSApplication.Delegate class. Here is where LibGDX encapsulates tasks and
registers handlers to process touch input, and other sensor data, and much more.
The instances of MyDemo and IOSApplicationConfiguration are passed as
arguments to the IOSApplication function.
In Android, we saw the AndroidManifest.xml file that specifies the characteristics,
permissions, and other features of our Demo-Android app. Similarly, our iOS app
has Info.plist.xml to hold such details. Before explaining Info.plist.xml , let's
see the robovm.properties and robovm.xml file.
The following code is taken from robovm.properties file in our demo-robovm project:
app.version=1.0
app.id=com.packtpub.libgdx.demo
app.mainclass=com.packtpub.libgdx.demo.RobovmLauncher
app.executable=MyDemo
app.build=1
app.name=MyDemo
This brief file contains, as the statements indicate, the app version, app ID, main
class, executable, build number, and name of app. These values will be used in the
Info.plist.xml file:
The following listing is taken from robovm.xml in our demo-robovm project:
<config>
<executableName>${app.executable}</executableName>
<mainClass>${app.mainclass}</mainClass>
<os>ios</os>
<arch>thumbv7</arch>
<target>ios</target>
<iosInfoPList>Info.plist.xml</iosInfoPList>
<resources>
<resource>
<directory>../android/assets</directory>
 
Search WWH ::




Custom Search