annotate XCodeiPhoneOS/README @ 2405:3d0b3a7d3bea gsoc2008_iphone

Added keyboard support in view initialization and proper deallocation of keyboard in -(void)dealloc, if keyboard is enabled
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Tue, 29 Jul 2008 17:19:23 +0000
parents e9a0bad0ea07
children
rev   line source
2376
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
1 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
2 Building the Simple DirectMedia Layer with iPhone OS 2.0
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
3 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
4
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
5 These instructions are for people who wish to use SDL to compile applications for iPhone OS 2.0.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
6
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
7 To build SDL, simply open the XCode Project (XCodeiPhoneOS/SDLiPhoneOS/SDLiPhoneOS.xcodeproj), select the target, and hit 'build'. You can also build in a CLI environment using the xcodebuild command line tool, if you wish.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
8
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
9 There are three build targets:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
10 - StaticLibiPhoneOS:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
11 Build SDL as a statically linked (armv6) library for iPhone OS 2.0.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
12 - StaticLibSimulator:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
13 Build SDL as a statically linked (x86) library for the iPhone Simulator
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
14 - Template:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
15 Package a project template together with freshly built libraries and copied headers.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
16 The template includes proper references to the SDL library, skeleton code for a basic SDL program, and placeholder graphics for the application icon and startup screen.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
17
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
18 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
19 Using the Simple DirectMedia Layer with iPhone OS 2.0
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
20 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
21
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
22 Here's probably the easiest method:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23 1. Build the iPhone SDL Application template.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
24 1. Install the iPhone SDL Application template (recommended directory is /Developer/Platforms/iPhoneOS.platform/Developer/Library/XCode/Project Templates/SDL Application/)
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
25 2. Start a new project using the template (SDL will be automatically included in your project)
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
26
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
27 Here's a more manual method:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
28 1. Create a new iPhone project
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
29 2. Build the SDL libraries (libSDLiPhoneOS.a and libSDLSimulator.a) and include them in your project. XCode will ignore the library that is not currently of the correct architecture, hence your app will work both on iPhone and in the iPhone Simulator.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
30 3. include the SDL header files in your project.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
31 4. Remove main.m and replace it with a new main.m (or main.c) which is coded like a normal SDL program. To replace main.m with a main.c, you must tell XCode not to use the project prefix file, which includes references to Cocoa Touch.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
32 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
33 Notes -- reading and writing files
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
34 ==============================================================================
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
35
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
36 Each application installed on iPhone resides in its own sandbox environment, including its own Application Home directory. For each installed application, the system generates a unique name for the application home directory, which appears as a long, incomprehensible string of numbers.
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
37
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
38 Once your application is installed, the directory tree looks like:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
39
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
40 MySDLApp Home/
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
41 MySDLApp.app
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
42 Documents/
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
43 Library/
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
44 Preferences/
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
45 tmp/
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
46
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
47 When your SDL based iPhone application starts up, it sets the working directory to the main bundle (MySDLApp Home/MySDLApp.app), where your application resources are stored. You cannot write to this directory, however -- instead, I advise you to write document files to "../Documents/" and preferences to "../Library/Preferences".
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
48
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
49 More information on this subject is available here:
756e6e35d029 just a readme for the files located in this directory
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
50 http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_6_section_3.html#//apple_ref/doc/uid/TP40007072-CH7-SW21