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

Cross platform mobile development with Xamarin

Cross platform mobile development with Xamarin

A talk I gave at CocoaHeads Copenhagen in June 2015.

Marcin Kuptel

June 18, 2015
Tweet

Other Decks in Programming

Transcript

  1. NOT IDEAL ▸ Double the amount of work ▸ More

    developers required ▸ Changes need to be made in multiple places
  2. BUT WHAT ABOUT THE UI? ▸ Either use Xamarin Designer

    ▸ Or stick with Interface Builder!
  3. ... WITH A FEW DIFFERENCES ▸ Strongly typed arrays instead

    of NSArray ▸ Delegate methods exposed through events and properties ▸ NSString becomes string
  4. THIRD PARTY LIBRARIES ▸ NuGet is a package manager built

    into Xamarin Studio ▸ Over 37,000 libraries ▸ Notifies you when a library has been updated ▸ You can easily publish your own
  5. API DEFINITION namespace Cocos2D { [BaseType (typeof (NSObject))] interface Camera

    { [Static, Export ("getZEye")] nfloat ZEye { get; } [Export ("restore")] void Restore (); ... } }
  6. CONTINUOUS INTEGRATION /Applications/Xamarin\ Studio.app/Contents/MacOS/mdtool -v build “--configuration:Release|iPhone” app/MyAwesomeApp.sln UNFORTUNATELY IT

    IS NOT POSSIBLE TO BUILD WITHOUT CODE-SIGNING security unlock-keychain -pPASSWORD ~/Library/Keychains/login.keychain
  7. NUNIT FOR UNIT TESTING [TestFixture] public class LoginViewModelTests { [Test]

    public void TestThatLoginViewModelCanBeCreated() { Mock<IAccountApi> mockAccount = new Mock<IAccountApi>(); Mock<IDialogService> dialogServiceMock = new Mock<IDialogService>(); ... Assert.IsNotNull(viewModel); }
  8. THE VERDICT ! Very easy to share code between platforms

    ! Good support from Xamarin ! Not enough iOS open source projects ! Xamarin Studio issues