Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Monotouch: C# + iOS = Good Times

Monotouch: C# + iOS = Good Times

MonoTouch allows you to harness all those C# skills and most of those handy .NET/Mono libraries to create truly native apps for iOS with a sprinkle of cross-platform support. But why not just use objective-c you cry? Choice is nice, so is C# and so is the range of libraries available for mono!

In this talk I will dive in to what makes MonoTouch so compelling for .NET developers wanting to break into iOS development and even how these skills can be harnessed to create cross platform native applications for iOS, Android and WP7 through a shared codebase.

0b2600a627d0af06ca6bbf9abe4067af?s=128

James Hughes

June 07, 2012
Tweet

More Decks by James Hughes

Other Decks in Technology

Transcript

  1. (C# + iOS = Good Times) MonoTouch o . o

    -
  2. \O/

  3. Mono? > OSS Implementation of .NET > Cross Platform >

    Up to date with .NET
  4. MonoTouch? > C# for iOS > Creates NATIVE Apps >

    Certain limitations - No JIT - No Reflection - No DLR
  5. + (NSDate *) stripTime:(NSDate *) date { NSCalendar *gregorian =

    [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *components = [gregorian components: (NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit) fromDate:date]; date = [gregorian dateFromComponents:components]; [gregorian release]; return date; }
  6. public DateTime StripTime(DateTime date) { return date.Date; }

  7. F.U.D > Cost > Apples EULA > Bugged Abstraction :(

  8. $399 - £255 - €320

  9. But what if Apple do the EULA shuffle? “ ”

  10. What if I find a bug in MonoTouch? “ ”

  11. MonoTouch Why?

  12. needed

  13. C# Obj-C Yikes! /

  14. iOS + C# Libraries

  15. o . o - Demo

  16. 1) Source Code 2) .NET Bytecode 3) AOT Compilation 4)

    iOS Machine Code C# -> iOS?
  17. > Touch.Unit > MonoTouch.Dialog > 3rd Party Libs - iOS

    - .NET > Recipes & Samples Extra Treats
  18. [TestFixture] public class Tests { [Test] public void Pass ()

    { Assert.True (true); } [Test] public void Fail () { Assert.False (true); } [Test] public void Ignore () { Assert.True (false); } } Touch.Unit
  19. public class Expense { [Section("Expense Entry")] [Entry("Enter expense name")] public

    string Name; [Section("Expense Details")] [Caption("Description")] [Entry] public string Details; [Checkbox] public bool IsApproved = true; [Caption("Category")] public Category ExpenseCategory; } MonoTouch.Dialog
  20. None
  21. None
  22. > Mono for Android > WP7 > Xamarin.Mobile - Contacts

    - Geolocation - Camera Beyond iOS
  23. Xamarim.Mobile

  24. james@yobriefca.se @kouphax o . o -