Game Development Reference
In-Depth Information
Figure 12-7. Belt Commander-Info.plist in Xcode
In Figure 12-7 , we see file Belt Commander-Info.plist as presented by Xcode. In this file, we see a
pretty standard setup for an iOS application. We see that the Bundle identifier is com.claywaregames.
beltcommander that corresponds to the application we created in iTunes Connect that supports in-app
purchases and Game Center. What is a little different in this file from the other samples in this topic
is that we specify the starting XIB files in this file. The starting XIB files are indicated by the key
values “Main nib file base name (iPad)” and “Main nib file base name (iPhone).” These keys are set
to the values “Window_iPad” and “Window_iPhone,” respectively. By setting these values, we are
requesting that the iOS application automatically use these files to create our main UIWindow and call
makeKeyAndVisible on it. This removes the need for us to put any code in our application delegate's
application: didFinishLaunchingWithOptions: task. To understand how the other objects in the
application relate to each other, let's take a look at XIB files for this game.
The XIB Files
The XIB files in this application bind instances of the key classes together and allow them to
coordinate. While this application is a universal one, and runs on both the iPhone and iPad, we are
going to focus on the iPhone XIB file because the iPad version is different only in layout. By looking
at the contents of this XIB file, we will understand how the application is put together. An overview is
shown in Figure 12-8 .
 
Search WWH ::




Custom Search