http://cocoawithlove.com/2010/04/design-of-multi-platform-app-using.html
This article shows how to build an app for multiple platforms using
Objective-C. It helps that much of the core libraries like
CoreFoundation are available as Open Source so they can be compiled on
Windows.
For a static library to work, it must be compiled for the CPU
architecture and the iPhone and Android phones currently have the ARM
architecture. I am not expert on these details though. Building for
multiple architectures requires a great deal of set up which with
Xcode is handled for you so that building for the iPhone Simulator
(x64 arch) and the iPhone/iPad device (ARM arch) is already done for
you. Setting it up to build on Windows is another matter.
Then you need to link and bind to this static library with whatever
native code you are going to be using. This may be Java for Android
and Blackberry and C# for the coming Windows Phone 7.
It's a good deal of work, but maybe if a strong group of developers
created the build environment as a part of an Open Source project
maybe Objective-C could be used for the core logic of mobile apps.
But why Objective-C? You may argue that there are already a lot of
iPhone apps available with lots of code written for mobile apps.
Objective-C would also allow you to leverage CoreFoundation.
Alternatively you might want to choose C which is more low level and
does not offer some of the benefits of Objective-C. You could build
your static libraries with Objective-C on the Mac with Xcode along
with the debugging and testing features to build a robust library. The
tools that make up the Xcode IDE are pretty good which does help the
developer be productive, providing an advantage over C.
Now just because I could do this, why would I consider it? Would
porting Objective-C to Java and C# really be that much work? I guess
it depends on the size of your code base and the number of features in
your app.
Anyway, it is an interesting idea. What do you think?
--
You received this message because you are subscribed to the Google Groups "Midwest iPhone SDK Developers" group.
To post to this group, send email to
mwiph...@googlegroups.com.
To unsubscribe from this group, send email to
mwiphonesdk...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mwiphonesdk?hl=en.