IPhone Development: Difference between revisions

From EiffelStudio: an EiffelSoftware project
Jump to navigation Jump to search
Manus (talk | contribs)
No edit summary
Manus (talk | contribs)
Line 6: Line 6:
* the latest iPhone SDK 3.0 and the latest Xcode
* the latest iPhone SDK 3.0 and the latest Xcode
* the official EiffelStudio 6.4 release for the Mac
* the official EiffelStudio 6.4 release for the Mac
== Getting ready ==
The iPhone development requires 2 targets and each target has its own value for the environment variable ISE_PLATFORM:
* iphone-x86: when testing under the iPhone simulator
* iphone-arm: when compiling for the actual iPhone device.
Every piece of C code has to be compiled for both targets. Therefore repeat the compilation instructions below twice, one for each target.
== Preparing the delivery ==
Under $ISE_EIFFEL/studio/spec, replicate the macosx-x86 into iphone-x86 and iphone-arm. Do the same in $ISE_EIFFEL/precomp/spec and $ISE_EIFFEL/studio/config.
== Compiling ==


Then you need to check out the source code. The easiest is to create a directory 65dev, go in this directory and then checkout the source code by doing:
Then you need to check out the source code. The easiest is to create a directory 65dev, go in this directory and then checkout the source code by doing:
  svn co https://svn.eiffel.com/eiffelstudio/trunk/Src .
  svn co https://svn.eiffel.com/eiffelstudio/trunk/Src .


Then set the environment variable '''ISE_LIBRARY''' to the 65dev directory above.
Then set the environment variable '''ISE_LIBRARY''' and '''EIFFEL_SRC''' to the 65dev directory above.
 
=== The Eiffel C runtime ===
Set ISE_PLATFORM accordingly and in $EIFFEL_SRC/C, type:
./quick_configure
 
Once compiled do:
cp config.sh $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include
cd run-time
cp *.h $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include/
cp lib* $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/lib/
 
=== The Eiffel C libraries ===


You need to compile some C code. Go in the $ISE_LIBRARY/experimental/library/objc_base/Clib and type
You need to compile some C code. Go in the $ISE_LIBRARY/experimental/library/objc_base/Clib and type
  finish_freezing -library
  finish_freezing -library
then go in $ISE_LIBRARY/experimental/library/iPhone/Clib and type again
then go in $ISE_LIBRARY/experimental/library/iPhone/Clib and type again
  finish_freezing -library
  finish_freezing -library

Revision as of 06:03, 23 June 2009

Not Ready for Review: This Page is Under Development!

Requirements

To develop in Eiffel for the iPhone, you need:

  • a Mac running Mac OS X 10.5.7
  • the latest iPhone SDK 3.0 and the latest Xcode
  • the official EiffelStudio 6.4 release for the Mac

Getting ready

The iPhone development requires 2 targets and each target has its own value for the environment variable ISE_PLATFORM:

  • iphone-x86: when testing under the iPhone simulator
  • iphone-arm: when compiling for the actual iPhone device.

Every piece of C code has to be compiled for both targets. Therefore repeat the compilation instructions below twice, one for each target.

Preparing the delivery

Under $ISE_EIFFEL/studio/spec, replicate the macosx-x86 into iphone-x86 and iphone-arm. Do the same in $ISE_EIFFEL/precomp/spec and $ISE_EIFFEL/studio/config.

Compiling

Then you need to check out the source code. The easiest is to create a directory 65dev, go in this directory and then checkout the source code by doing:

svn co https://svn.eiffel.com/eiffelstudio/trunk/Src .

Then set the environment variable ISE_LIBRARY and EIFFEL_SRC to the 65dev directory above.

The Eiffel C runtime

Set ISE_PLATFORM accordingly and in $EIFFEL_SRC/C, type:

./quick_configure

Once compiled do:

cp config.sh $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include
cd run-time
cp *.h $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/include/
cp lib* $ISE_EIFFEL/studio/spec/$ISE_PLATFORM/lib/

The Eiffel C libraries

You need to compile some C code. Go in the $ISE_LIBRARY/experimental/library/objc_base/Clib and type

finish_freezing -library

then go in $ISE_LIBRARY/experimental/library/iPhone/Clib and type again

finish_freezing -library

Compiling your first iPhone application

Compile the project in $ISE_LIBRARY/examples/iphone/basic. Once done you have a binary called `basic'.