Introduction to MonoTouch Developing iPhone Applications with C# Mike Bluestein 6/19/2010
What is MonoTouch?
- Platform for creating native iPhone application using .Net
- Bindings to Objective-C classes
- Interface Builder Integration
- Stellar Development Team and Community
What do I need?
What can I do in MonoTouch?
- Anything you can do in Objective-C
- Full support for CocoaTouch
- Additionally adds .Net framework (based upon Moonlight)
- ADO.Net wrappers over SQLite
- Can port most non-ui code with little or sometimes no code change
How does it work?
- MonoTouch uses Ahead-Of-Time compilation to produce a single statically compiled ARM binary.
- AOT compilation pre-generates all the native code that the JIT would normally generate from IL.
- Links this together with the JIT-less runtime into a single native binary that can be signed.
- IL is stripped from the managed assemblies, leaving only metadata
More About JIT-less environment
- Apple restricts this by policy and in kernel.
- Eliminates some .Net areas
- .Net objects are garbage collected
- Objective-C (on iPhone) however uses retain counts
- MonoTouch abstracts this away
- Creates an autorelease pool for anything on the main thread as well as thread pool threads
- You create autorelease pool if using objective-c objects on your own threads.
- blog: mikebluestein.wordpress.com
- email: firstname.lastname@example.org
- monotouch.net - official monotouch site
- monotouch.info - unofficial community site that aggregates
- lots of MonoTouch content
- irc: #monotouch irc.gnome.org