Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross platform mobile development with Xamarin
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Marcin Kuptel
June 18, 2015
Programming
0
28
Cross platform mobile development with Xamarin
A talk I gave at CocoaHeads Copenhagen in June 2015.
Marcin Kuptel
June 18, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
MUSUBIXとは
nahisaho
0
140
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
740
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
130
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
2026年 エンジニアリング自己学習法
yumechi
0
140
CSC307 Lecture 03
javiergs
PRO
1
490
並行開発のためのコードレビュー
miyukiw
0
250
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
AI & Enginnering
codelynx
0
110
Featured
See All Featured
Design in an AI World
tapps
0
140
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
The Curse of the Amulet
leimatthew05
1
8.6k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
Context Engineering - Making Every Token Count
addyosmani
9
660
Documentation Writing (for coders)
carmenintech
77
5.3k
Six Lessons from altMBA
skipperchong
29
4.1k
Leo the Paperboy
mayatellez
4
1.4k
A Tale of Four Properties
chriscoyier
162
24k
Testing 201, or: Great Expectations
jmmastey
46
8k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Transcript
CROSS PLATFORM MOBILE DEVELOPMENT WITH XAMARIN MARCIN KUPTEL
None
NOT IDEAL ▸ Double the amount of work ▸ More
developers required ▸ Changes need to be made in multiple places
CAN WE DO BETTER?
None
None
XAMARIN STUDIO
BUT WHAT ABOUT THE UI? ▸ Either use Xamarin Designer
▸ Or stick with Interface Builder!
PROFILING TOOLS ▸ HeapShot - Xamarin's own memory and performance
tool ▸ Xamarin Profiler
C# ▸ generics ▸ lambda expressions ▸ optionals
C# USES GARBAGE COLLECTION
HOW DO C# AND OBJECTIVE C WORK TOGETHER?
GOTCHA NO. 1 UIIMAGE
THE DISPOSE PATTERN
IOS C# ➡ ARM ASSEMBLY ANDROID C# ➡ IL ➡
ASSEMBLY AT RUNTIME
All IOS FRAMWORKS ARE AVAILABLE
... WITH A FEW DIFFERENCES ▸ Strongly typed arrays instead
of NSArray ▸ Delegate methods exposed through events and properties ▸ NSString becomes string
GOTCHA NO. 2 UITableViewDelegate and UITableViewDataSource are classes
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
BINDING PROJECTS
API DEFINITION namespace Cocos2D { [BaseType (typeof (NSObject))] interface Camera
{ [Static, Export ("getZEye")] nfloat ZEye { get; } [Export ("restore")] void Restore (); ... } }
SHARING CODE
SHARED PROJECT #if __IOS__ nsDispatcher.BeginInvokeOnMainThread(NotifyListeners); #elif __ANDROID__ Dispatcher.RunOnUiThread(() => NotifyListeners());
#endif
PORTABLE CLASS LIBRARY
OUR PROJECTS
SHARING ASSETS
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
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); }
THE VERDICT ! Very easy to share code between platforms
! Good support from Xamarin ! Not enough iOS open source projects ! Xamarin Studio issues
THANKS! @MARCINKUPTEL