SlideShare a Scribd company logo
Cross Platform Native Mobile App
Development for iOS, Android and
Windows Using the Power of C#

Marcel de Vries
Technology Manager
@marcelv
Agenda
Introduction to Xamarin& Mobile
Creating your first iOS app
Creating your first Android app
Code Sharing Tips
Summary
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
Building apps for the Mobile Space
Developer

User
Experience

productivity

Security &
privacy

Distribution:
Public or private
Corporate?

Which
platforms?
Application
Lifecycle
Management
Application types
Application types
Native look & feel

--

--

++

Camera Access

-++

+++

++
++

Secure service communication

JSON/REST

JSON/REST

JSON/SOAP

Access to calendar

--

--

++

Twitter integration

+-

+-

+

Distribution

++

AppStore presence

AppStore presence

GPS
3 types

Xamarin

WP8/win8
Xaml + C#
Xamarin

Xamarin.iOS

Xamarin.Android

XCode
Objective-C

WP7
Silverlight
C#

Adobe AIR
ActionScript

Appcelerator Titanium
JavaScript > Native

Service2Media
Lua

Rhodes
Ruby + HTML
Android SDK
Java

Antenna
Rapid Scripting
Language
Kony
Javascript
Lua

Vendor tools

Sybase Unwired
“4GL” code gen

C#
App Logic

PhoneGap
HTML5 / CSS / JS

“Magic Box”

Shared
language
Hybrid
Xamarin History
Over a Decade of Enterprise Production Use
450,000
Reach 200,000
Developers
Developer
100+ Partners
Mark
100+ Components

2000

Ximian
Founded

2001

2003

2009

2011

Mono
Launches

Ximian
Acquired
by Novell

First iOS
product (now
Xamarin.iOS)
launches

2013

Xamarin
Founded

2012

First
Xamarin 2.0
release of
Xamarin.Mac Component
First
Store
Release of
Launch
Xamarin Test
Xamarin.Android Partner
Cloud
Program
Evolve 2013
Microsoft
Partnership
Anything you can do in Objective-C or Java can be
done in C# and Visual Studio with Xamarin.
Native Performance

Xamarin.iOS does full Ahead Of
Time (AOT) compilation to produce
an ARM binary suitable for Apple’s
App Store.

Xamarin.Android takes advantage
of Just In Time (JIT) compilation
on the Android device.
Accelerate Development with Code
Sharing
Code sharing statistics from production Xamarin app: real-time
circuit simulator and editor used to design analog and digital
circuits
Completely Up-to-Date with Device OS releases

Always up-to-date with the
latest APIs from Apple and
Google.
Track record of offering sameday support: iOS 5, iOS 6, iOS

✔

6.1 and iOS 7.
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
UIKit

3rd party app

Tap app icon
main()

AppDelegate

UIApplicationMain()

FinishedLaunching

Event loop

HandleEvent

Quit foreground msg

OnActivated
OnResignActivation

Background

DidEnterBackground
WillTerminate

Restart tasks
Reload state
Refresh
Pause tasksUI
Throttle down
frame rates

Save state

Save data
Free resources
App model
View

UIView
Actions

Outlets
Controller
NavigationController

Model manipulation

Model

UIViewController
UITableView & Navigation
UITableView & Navigation
Data + table cells

UITableViewDataSource

UITableViewController

UITableViewSource

Events

UITableViewDelegate
Demo
iOS app basics
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
Android

Mobile OS made by google
Targets: Tablets and mobile phones
Mono for Android
Architectural picture of Mono for Android
.NET APIs

Android
Bindings

Mono (.NET Runtime)

MCW
ACW

Linux Kernel

Android.
*

Java.*

Dalvik (Java Runtime)
App model - Activity lifecycle
Activity
Launched
Restore
state here

Initialize
layout here

onCreate()

User navigates to
the activity

onStart()

onRestart()

onResume()
Another activity
App process comes into the
foreground

killed

Activity
running

The activity is no longer visible
Apps with higher state
The activitySave
is finishing or being onPause()
priority need
destroyed by the system
memory here
onStop()

onDestroy()

Activity shut
down

User returns to
the activity

User navigates to
the activity
Building apps on android

Intent

Intent

Activity
Intent

Content
Provider

View

Intent

Activity

Intent

View

Service

Intent

Broadcast
Receiver
Demo
Android app basics
Services
21%

Reusable
34%

Per App
Specific
16%

Windows
Phone
10%
Shared
84%

iOS
8%
Android
10%

Shared Logic
17%
Platform UI
Design Patterns for Reuse

Data
Serialization
Caching

Security

Application Business Logic

AuthN/AuthZ
Encryption
Data Self Destruction

Utilities

Platform Agnostic API

Device services

Analytics
Logging

Glue together the
application layers
Design Patterns for Reuse
Basics
View

Controller
Model

GPS
Motion sensors
Storage
Etc.

Services
Model Implementation
We implement the Model as a Singleton
Model Implements INotifyPropertyChanged
Easy to enlist subscribers
Facilitate automatic databinding in XAML
Model contains rich features such as filtering and
advanced selections
Easy to share logic
Model Implementation
public class MainModel : INotifyPropertyChanged
{
private static MainModel _model;
private static object _lockHandle = new object();
// Facilitates Windows Phone app resume
public void RestoreState(MainModel state)
{
_model = state;
}
public static MainModel Current
{
get {
if (_model == null) {
_model = new MainModel();
}
return _model;
}
}
public IEnumerable<Event> ActualEvents {
get {
// E.g. Complex linq stuff
}
}
}

// Model Usage:
var foo = MainModel.Current.ActualEvents;
Check your water level
XAML /

Device Specific

ValueConverter

Reusable Business Logic
Model Property
Value
Transformation
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
public class ISKEController
{
private static ISKEController _instance;
private ISKEDomainServicesoap _proxy;
public static ISKEController Current
{
get {
if (_instance == null) {
_instance = new ISKEController();
}
return _instance;
}
}
private void GetActualEvents (Action<object> OnSuccess, Action<Exception> OnFail)
{
// do some logic, or service call
// use actions to report result or trigger UI action
}
}
S

F
UIViewControlle
r

S

F
XAML View

Activity

public void OnSuccess(object
data)public void OnFailed(Exception
{
e)
//{Do something with data
Shared Controller
// Notify user
// Do GetActualEvents
something with error
}
}

(Action<object> OnSuccess,
Action<Exception> OnFail)

Web Services

S

F

Model
PropertyChanged(“Events”)
;
Demo
Action<T>
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
iOS

MonoTouch.CoreLocation
MonoTouch.CoreMotion
MonoTouch.AVFoundation
MonoTouch.AddressBook
MonoTouch.EventKit
…

Android:
Android.Hardware.Sensor
Android.Location
Android.Bluetooth
Android.Nfc
…

Windows Phone:
Microsoft.Devices.Sensors.Gyroscope
Microsoft.Devices.Sensors.Accelerometer
Microsoft.Devices.Sensors.Compass
Microsoft.Devices.Sensors.Motion
…
Partial classes &
methods
A.cs
partial class A
{
// Half of the implementation
}

A.extra.cs
partial class A
{
// The other half
}
A.cs

A.iOS.cs

partial classAlways private and returns
A
{
void
// Declare the method here
partial void DoSomethingEx();

partial class A
{
// Provide the implementation here
partial void DoSomethingEx()
{
public void DoSomething()
// Do something iOS specific
{
}
// Some shared logic be used from shared
}
Can
Leaves room for specific
DoSomethingEx();
logic
implementation
}

}
Cross platform native mobile app development for iOS, Android and Windows using the power of C#
Demo
Summary
Xamarin provides Native Cross platform
capabilities
– Best of all worlds

Use the power of C#
– BCL, LINQ, ASYNC, etc

Keep abstractions as simple as possible
– Avoid IOC, Big frameworks
– Remember your on a mobile device, each cycle
counts!

More Related Content

What's hot (20)

PPTX
Solution-Architectures-MADP-20180125
FirmansyahIrma1
 
PPTX
SharePoint Mobile App Development with Xmarin
Hector Luciano Jr
 
PDF
Xamarin Platform
Rui Marinho
 
PPTX
Cross platformmobileapp
Dhananjay Kumar
 
PDF
How Xamarin Is Revolutionizing Mobile Development
MentorMate
 
PDF
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
Nick Landry
 
PPTX
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
İbrahim KIVANÇ
 
PDF
B feigin mobileapplicationdevelopment
sathesh leo
 
PPT
Developing Cross-platform Native Apps with Xamarin
danhermes
 
PDF
Windows 10 IoT Core - Inovasyon Haftasi - TİM
İbrahim KIVANÇ
 
PPTX
Azure for Android Developers
MobileAcademy
 
PPTX
Xamarin Forms, MVVM and Testing
Gyuwon Yi
 
PPTX
Building cross-platform mobile apps with Xamarin
Hajan Selmani
 
PDF
Java with android
elshiekh1980
 
PPTX
Titanium presentation
aaltavas
 
PDF
Top reasons why to choose xamarin for mobile app development
FugenX
 
PPTX
Adding advanced Device Capabilities to Android
Joachim Ritter
 
DOCX
Reason why app development company choose xamarin for cross platform
Aimore Technologies
 
PDF
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
FalafelSoftware
 
PPTX
Choosing the Right Mobile Development Platform (Part 5)
Chris Griffith
 
Solution-Architectures-MADP-20180125
FirmansyahIrma1
 
SharePoint Mobile App Development with Xmarin
Hector Luciano Jr
 
Xamarin Platform
Rui Marinho
 
Cross platformmobileapp
Dhananjay Kumar
 
How Xamarin Is Revolutionizing Mobile Development
MentorMate
 
State of Union: Xamarin & Cross-Platform .NET in 2016 and Beyond
Nick Landry
 
GDG DevFest Istanbul - Mobile DevOps - Build, Test and Deploy Your Android Ap...
İbrahim KIVANÇ
 
B feigin mobileapplicationdevelopment
sathesh leo
 
Developing Cross-platform Native Apps with Xamarin
danhermes
 
Windows 10 IoT Core - Inovasyon Haftasi - TİM
İbrahim KIVANÇ
 
Azure for Android Developers
MobileAcademy
 
Xamarin Forms, MVVM and Testing
Gyuwon Yi
 
Building cross-platform mobile apps with Xamarin
Hajan Selmani
 
Java with android
elshiekh1980
 
Titanium presentation
aaltavas
 
Top reasons why to choose xamarin for mobile app development
FugenX
 
Adding advanced Device Capabilities to Android
Joachim Ritter
 
Reason why app development company choose xamarin for cross platform
Aimore Technologies
 
The Hitchhicker’s Guide to Windows Azure Mobile Services | FalafelCON 2014
FalafelSoftware
 
Choosing the Right Mobile Development Platform (Part 5)
Chris Griffith
 

Similar to Cross platform native mobile app development for iOS, Android and Windows using the power of C# (20)

PPTX
Introduction to xamarin
Alejandro Ruiz Varela
 
PDF
[XamarinDay] Xamarin History - From 0 to microsoft acquisition !
Cellenza
 
PDF
Lecture 08 Xamarin
Maksym Davydov
 
PPTX
App innovationcircles xamarin
Mohit Chhabra
 
PPTX
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
RedFabriQ
 
PPTX
Cross platform mobile app development with Xamarin
Pranav Ainavolu
 
PDF
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
YASH Technologies
 
PPTX
Windows Development Story with Xamarin
Joshua Drew
 
PDF
Eindhoven Mobile Development First Meetup Slides
Chris Key
 
PDF
FirstMeetupSlides
Stephan van Stekelenburg
 
PDF
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
Rosalie Lauren
 
PDF
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Xamarin
 
PPTX
Dia 1 intro to mobile and xamarin
Hernan Zaldivar
 
PDF
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
Nick Landry
 
PPTX
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin
 
PDF
Going Mobile with C#, Visual Studio, and Xamarin
Matthew Soucoup
 
PDF
Xamarin for (not only) Android developers
Aleksander Piotrowski
 
PPTX
Introduction to xamarin
Christos Matskas
 
PPTX
Xamarin COE by Mukteswar Patnaik
Mukteswar Patnaik
 
Introduction to xamarin
Alejandro Ruiz Varela
 
[XamarinDay] Xamarin History - From 0 to microsoft acquisition !
Cellenza
 
Lecture 08 Xamarin
Maksym Davydov
 
App innovationcircles xamarin
Mohit Chhabra
 
20140207 xamarin-red fabriq-microsoft-techdays-nativemobileappdevelopmentwith...
RedFabriQ
 
Cross platform mobile app development with Xamarin
Pranav Ainavolu
 
Xamarin Technical Assessment Against Native for Cross Platform Mobile Develop...
YASH Technologies
 
Windows Development Story with Xamarin
Joshua Drew
 
Eindhoven Mobile Development First Meetup Slides
Chris Key
 
FirstMeetupSlides
Stephan van Stekelenburg
 
Why Xamarin is the Best to Build Cost-Effective Mobile Apps
Rosalie Lauren
 
Sharing up to 80% code for iOS, Android, and Windows platforms, a Retail App ...
Xamarin
 
Dia 1 intro to mobile and xamarin
Hernan Zaldivar
 
Building Mobile Cross-Platform Apps for iOS, Android & Windows in C# with Xam...
Nick Landry
 
Xamarin and SAP Mobile Platform for Mobile Enterprise Success
Xamarin
 
Going Mobile with C#, Visual Studio, and Xamarin
Matthew Soucoup
 
Xamarin for (not only) Android developers
Aleksander Piotrowski
 
Introduction to xamarin
Christos Matskas
 
Xamarin COE by Mukteswar Patnaik
Mukteswar Patnaik
 
Ad

More from Marcel de Vries (10)

PDF
Best practices for using open source software in the enterprise
Marcel de Vries
 
PDF
Architecting systems for continuous delivery
Marcel de Vries
 
PDF
Using microsoft application insights to implement a build, measure, learn loop
Marcel de Vries
 
PPTX
Continuous delivery with Release Management for visual Studio
Marcel de Vries
 
PPTX
Release management with tfs 2013
Marcel de Vries
 
PPTX
Release management with tfs 2013
Marcel de Vries
 
PPTX
Leveraging the azure cloud for your mobile apps
Marcel de Vries
 
PPTX
Developing i phone, android and windows phone 7 applications with c#
Marcel de Vries
 
PPTX
Cross platform mobile developement introduction
Marcel de Vries
 
PPTX
Mobile en cloud wat is de impact op ons huidige it ecosysteem
Marcel de Vries
 
Best practices for using open source software in the enterprise
Marcel de Vries
 
Architecting systems for continuous delivery
Marcel de Vries
 
Using microsoft application insights to implement a build, measure, learn loop
Marcel de Vries
 
Continuous delivery with Release Management for visual Studio
Marcel de Vries
 
Release management with tfs 2013
Marcel de Vries
 
Release management with tfs 2013
Marcel de Vries
 
Leveraging the azure cloud for your mobile apps
Marcel de Vries
 
Developing i phone, android and windows phone 7 applications with c#
Marcel de Vries
 
Cross platform mobile developement introduction
Marcel de Vries
 
Mobile en cloud wat is de impact op ons huidige it ecosysteem
Marcel de Vries
 
Ad

Recently uploaded (20)

DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 

Cross platform native mobile app development for iOS, Android and Windows using the power of C#

Editor's Notes

  • #7: Rhodes – rhomobile ; Ruby + HTML; MVC architectuur met extra framework zakenvoor sync en ORMAntenna: Appcellerator: pure javascriptoplossing met cross platform API. Wel: native UI bindings. Interpreted door meegedeployde interpreter
  • #27: Data Self Destruction: when a device gets compromised, you’d want some way built into the app to enable data self destruction. This might be some generic security class that is able to wipe the data portion of the application based on some (remote) signal.
  • #28: Controller acts as a Mediator in Cocoa interpretation of MVC
  • #32: Photo Credit: &lt;a href=&quot;http://www.flickr.com/photos/45409431@N00/3499224439/&quot;&gt;marfis75&lt;/a&gt; via &lt;a href=&quot;http://compfight.com&quot;&gt;Compfight&lt;/a&gt; &lt;a href=&quot;http://creativecommons.org/licenses/by-sa/2.0/&quot;&gt;cc&lt;/a&gt;