renamed and moved up one directory gsoc2008_iphone
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Fri, 15 Aug 2008 23:51:11 +0000
branchgsoc2008_iphone
changeset 2442ce6623e28015
parent 2441 ed6a41cc2bce
child 2443 febfb349b467
renamed and moved up one directory
XCodeiPhoneOS/README
     1.1 --- a/XCodeiPhoneOS/README	Fri Aug 15 23:48:49 2008 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,50 +0,0 @@
     1.4 -==============================================================================
     1.5 -Building the Simple DirectMedia Layer with iPhone OS 2.0
     1.6 -==============================================================================
     1.7 -
     1.8 -These instructions are for people who wish to use SDL to compile applications for iPhone OS 2.0.
     1.9 -
    1.10 -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. 
    1.11 -
    1.12 -There are three build targets:
    1.13 -- StaticLibiPhoneOS:
    1.14 -	Build SDL as a statically linked (armv6) library for iPhone OS 2.0.
    1.15 -- StaticLibSimulator:
    1.16 -	Build SDL as a statically linked (x86) library for the iPhone Simulator
    1.17 -- Template:
    1.18 -	Package a project template together with freshly built libraries and copied headers.
    1.19 -  	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.
    1.20 -
    1.21 -==============================================================================
    1.22 -Using the Simple DirectMedia Layer with iPhone OS 2.0
    1.23 -==============================================================================
    1.24 -
    1.25 -Here's probably the easiest method:
    1.26 -1.  Build the iPhone SDL Application template.
    1.27 -1.  Install the iPhone SDL Application template (recommended directory is /Developer/Platforms/iPhoneOS.platform/Developer/Library/XCode/Project Templates/SDL Application/)
    1.28 -2.  Start a new project using the template (SDL will be automatically included in your project)
    1.29 -
    1.30 -Here's a more manual method:
    1.31 -1.  Create a new iPhone project
    1.32 -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.
    1.33 -3.  include the SDL header files in your project.
    1.34 -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.
    1.35 -==============================================================================
    1.36 -Notes -- reading and writing files
    1.37 -==============================================================================
    1.38 -
    1.39 -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.
    1.40 -
    1.41 -Once your application is installed, the directory tree looks like:
    1.42 -
    1.43 -MySDLApp Home/
    1.44 -	MySDLApp.app
    1.45 -	Documents/
    1.46 -	Library/
    1.47 -		Preferences/
    1.48 -	tmp/
    1.49 -
    1.50 -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".  
    1.51 -
    1.52 -More information on this subject is available here:
    1.53 -http://developer.apple.com/iphone/library/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ApplicationEnvironment/chapter_6_section_3.html#//apple_ref/doc/uid/TP40007072-CH7-SW21