Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Intro to MonoTouch


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Intro to MonoTouch

  1. 1. Introduction to MonoTouch Developing iPhone Applications with C# Mike Bluestein 6/19/2010
  2. 2. What is MonoTouch? <ul><li>Platform for creating native iPhone application using .Net </li></ul><ul><ul><li>Ahead of Time Compiler </li></ul></ul><ul><ul><li>Bindings to Objective-C classes </li></ul></ul><ul><ul><li>Garbage Collection </li></ul></ul><ul><ul><li>MonoDevelop IDE </li></ul></ul><ul><ul><li>Remote Debugger </li></ul></ul><ul><ul><li>Interface Builder Integration </li></ul></ul><ul><ul><li>Stellar Development Team and Community </li></ul></ul>
  3. 3. What do I need? <ul><ul><li>Mac running Snow Leopard </li></ul></ul><ul><ul><li>iPhone Developer account </li></ul></ul><ul><ul><li>MonoTouch License </li></ul></ul>
  4. 4. What can I do in MonoTouch? <ul><ul><li>Anything you can do in Objective-C </li></ul></ul><ul><ul><li>Full support for CocoaTouch </li></ul></ul><ul><ul><li>Additionally adds .Net framework (based upon Moonlight) </li></ul></ul><ul><ul><ul><li>Linq </li></ul></ul></ul><ul><ul><ul><li>Generics </li></ul></ul></ul><ul><ul><ul><li>WCF </li></ul></ul></ul><ul><ul><ul><li>ADO.Net wrappers over SQLite </li></ul></ul></ul><ul><ul><ul><li>etc... </li></ul></ul></ul><ul><ul><ul><li>Can port most non-ui code with little or sometimes no code change </li></ul></ul></ul>
  5. 5. How does it work? <ul><li>MonoTouch uses Ahead-Of-Time compilation to produce a single statically compiled ARM binary. </li></ul><ul><ul><li>AOT compilation pre-generates all the native code that the JIT would normally generate from IL. </li></ul></ul><ul><ul><li>Links this together with the JIT-less runtime into a single native binary that can be signed. </li></ul></ul><ul><ul><ul><li>Apple does not allow JIT </li></ul></ul></ul><ul><ul><li>IL is stripped from the managed assemblies, leaving only metadata </li></ul></ul>
  6. 6. More About JIT-less environment  <ul><ul><li>Apple restricts this by policy and in kernel. </li></ul></ul><ul><ul><li>Eliminates some .Net areas </li></ul></ul><ul><ul><ul><li>CodeDom </li></ul></ul></ul><ul><ul><ul><li>Reflection-Emit </li></ul></ul></ul><ul><ul><ul><li>DLR </li></ul></ul></ul>
  7. 7. Memory Management <ul><ul><li>.Net objects are garbage collected </li></ul></ul><ul><ul><li>Objective-C (on iPhone) however uses retain counts </li></ul></ul><ul><ul><li>MonoTouch abstracts this away </li></ul></ul><ul><ul><ul><li>Creates an autorelease pool for anything on the main thread as well as thread pool threads </li></ul></ul></ul><ul><ul><ul><li>You create autorelease pool if using objective-c objects on your own threads. </li></ul></ul></ul>
  8. 8. Demos
  9. 9. Questions? <ul><li>twitter: @mikebluestein </li></ul><ul><li>blog: </li></ul><ul><li>email: </li></ul><ul><li>Resources: </li></ul><ul><li>  - official monotouch site </li></ul><ul><li> - unofficial community site that aggregates </li></ul><ul><li>  lots of MonoTouch content </li></ul><ul><li>irc: #monotouch </li></ul>