Game Development Reference
In-Depth Information
@end
The key point to take away here is that Android apps completely ignore the AppDeleg-
ate class. If you change the launch scene in AppDelegate 's startScene method,
you'll also have to change the startScene method in the Activity class. Further-
more, any custom code you write in the AppDelegate file will not be included in Android
builds. Likewise, any code in the Activity class will not run in iOS builds.
Tip You should generally create a class that contains common code and data
that needs to be used by both AppDelegate and the Activity class. The
simplest example is to declare a static NSString* FirstS-
ceneToLaunch = @"MainScene"; initialized to the name of the first
scene to launch. You can then import that header in both AppDelegate and the
Activity class and use the FirstSceneToLaunch identifier in both files.
That way, you need to edit in only one place, instead of risking that Ap-
pDelegat e and Activity do completely different things.
In the Resources/Platforms/Android group, you'll find the AndroidManifest.xml . It con-
tains various build parameters as well as settings similar to the Info.plist on iOS. You may
need to edit this file to use certain Android-specific features, such as Leaderboards and In-
App purchases. Refer to the documentation of the Android SDK API in question, which
will point out any requirements for the AndroidManifest.xml .
The Android version of the Info.plist contains just basic information about your app,
mainly its name, default localization, and bundle identifier. You'll also find two folder ref-
erences, Published-iOS and Published-Android, containing the iOS and Android versions
of the resource files managed by SpriteBuilder. Of course, only the iOS resource files are
included in iOS builds, while only the Android resource files are included in Android
builds.
Tip The two Published folders do about double the size of the project, which
may be a concern for users of source-control software. You should exclude
these two folders from source control. A new user obtaining a copy of the re-
pository would simply have to open the SpriteBuilder project and publish once
to create local copies of the published files. That way, you'll avoid storing
dozens, if not hundreds, of megabytes of published resource files under source
control.
Search WWH ::




Custom Search