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
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
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
PHP8.3の機能を振り返る / Review of PHP 8.3 features
seike460
PRO
1
110
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
340
GitHub Copilotのススメ
marcy731
1
200
はてなにおける CSS Modules、及び CSS Modules に足りないもの / CSS Modules in Hatena, and CSS Modules missing parts
mizdra
7
930
Netty Chicago Java User Group 2024-04-17
sullis
0
180
使ってみよう Azure AI Document Intelligence
kosmosebi
2
310
Git Lint
bkuhlmann
4
750
スキーマ駆動開発による品質とスピードの両立 - 私達は何故、スキーマを書くのか
kentaroutakeda
0
170
ゆるい個人開発のススメ
kuroppe1819
10
990
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
1
110
Site Reliability Engineering for GMO
pyama86
8
1k
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Designing for Performance
lara
601
67k
Designing with Data
zakiwarfel
96
4.8k
A Tale of Four Properties
chriscoyier
151
22k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
78
42k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Fireside Chat
paigeccino
21
2.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
37
2.5k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
How to name files
jennybc
65
93k
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