[xsde-users] Support for iPhone platform

Boris Kolpackov boris at codesynthesis.com
Thu Sep 11 09:49:12 EDT 2008


Hi Vladimir,

I've successfully compiled the XSD/e runtime and examples for
iPhoneOS 2.0 and the simulator. I also ran the examples built
for the simulator. I haven't had a chance to run the examples
on the actual device yet (there does not seem to be a console
on iPhone so we will need to create some kind of driver for
the examples).

I have prepared the XSD/e package for Mac OS X (Intel) which
you can download via this link:

http://www.codesynthesis.com/~boris/tmp/xsde-2.1.0-i686-macosx.tar.bz2

In this package you will find the XSD/e compiler binary as well
as the source code for the runtime and examples. It also contains
two sample configuration files in the etc/iphone/ directory: one
is for the device and one is for the simulator. You will need to
copy one of these files to the config/ directory and rename it
to config.make. If your iPhone SDK is installed in a location
other than the default (/Developer) then you will need to adjust
the paths at the beginning of the config file. You may also want
to check other configuration parameters (e.g., use of iostream,
STL, C++ exceptions, etc; they are all enabled by default).

Once you are happy with your config file you can build the runtime
library by changing to the libxsde/ directory and running make
from there. Once the build is complete you will find libxsde.a in
the libxsde/xsde/ directory.

I assume you are using the XCode IDE to build your application.
If that's the case then probably the easiest way to integrate
the generated code into your project would be to change the
generated source file suffix from .cxx to .mm as suggested
in the answer to the "How do I enable Objective-C++ compilation?"
question in the Apple FAQ:

https://developer.apple.com/iphone/library/codinghowtos/Tools/index.html

You can do it automatically with the '--cxx-suffix .mm' option. See
the XSD/e Compiler Manual for more information:

http://codesynthesis.com/projects/xsde/documentation/xsde.xhtml

Other than that you will need to add the libxsde/ directory to the
include directory list and link to libxsde.a found in libxsde/xsde/.

Let me know if there are any problems as well as if everything is
working fine.

Boris



More information about the xsde-users mailing list