SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Introduction to iOS… 9
Craig Dunn

Xamarin

@conceptdev
On the menu?
File New App
How it works
iOS 9
Configuration
UI design
C# code
File > New
iPad Multitasking
-‐ Adaptive layout
-‐ Size classes
-‐ Configuration:
+ LaunchScreen.storyboard
+ support all iPad
orientation options
How it works
Xamarin’s Unique Approach
iOS C# UI

Windows C# UI
Android C# UI
Shared C# Code
github.com/xamarinhq/app-‐acquaint
Under the Hood Bonnet
Native UI
Storyboards & XIBs
User Interface code (﴾C#)﴿
UIKit, MapKit,
CoreLocation
…
Shared C# Code
• Business Logic
• Database
• Web services
• File operations
custom
bindings
Mono (﴾.NET Framework)﴿
• System.Net
CocoaPods
Objective-‐C
NSUrlSession
SQLite
iOS
iOS C# UI

Windows C# UI
Android C# UI
Shared C# Code
Xamarin
System.Net
Choose the Mono managed or the native iOS
network stack for WebClient & HttpClient
*
*
Application Transport Security
-‐ HTTPS “just works”
-‐ HTTP exceptions
-‐ HTTP opt-‐out
Native Performance
Xamarin.iOS does full Ahead Of Time (﴾AOT)﴿ compilation
with LLVM to produce an ARM binary for Apple’s App Store.
Shine with iOS 9
iOS 9
-‐ UIStackView & Localization
-‐ Core Spotlight
-‐ NSUserActivity / Handoff
-‐ Universal linking
-‐ 3D Touch
+ Quick Actions
UIStackView
UIStackView
Horizontal & vertical orientation
Leading and Trailing
(﴾not Left and Right)﴿
UIStackView & Localization
Localization Configuration
<key>CFBundleLocalizations</key>
<array>
<string>de</string>
<string>es</string>
<string>ja</string>
<string>he</string>
<string>ar</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
Info.plist
Localized Content
Localized Content
Localization
Core Spotlight
Core Spotlight (﴾Search)﴿
public override void Index (Task t)
{

var attributeSet = new CSSearchableItemAttributeSet (UTType.Text);

attributeSet.Title = t.Name;

attributeSet.ContentDescription = t.Notes;

attributeSet.TextContent = t.Notes;

var dataItem = new CSSearchableItem (t.Id.ToString(), "co.conceptdev.to9o",
attributeSet);

}
// delete items
CSSearchableIndex.DefaultSearchableIndex.Delete (new string[] {t.Id.ToString()}, err => {})
// index all-at-once (for reference material)
var dataItems = new List<CSSearchableItem>();

foreach (var session in sessions)

{
Index (session);
}
Responding to Search
public override bool ContinueUserActivity (UIApplication application,

NSUserActivity userActivity, 

UIApplicationRestorationHandler completionHandler)

{

// Take action based on the activity type

if (userActivity.ActivityType == CSSearchableItem.ActionType)

{

var uuid = userActivity.UserInfo.ObjectForKey (CSSearchableItem.ActivityIdentifier);
ContinueNavigation (); // custom implementation
}
NSUserActivity / Handoff
NSUserActivity / Handoff
Creating NSUserActivity for Handoff
<key>NSUserActivityTypes</key>
<array>
<string>my.custom.identifier.add</string>
<string>my.custom.identifier.edit</string>
</array>
Info.plist
Creating NSUserActivity for Handoff
var activity = new NSUserActivity ("my.custom.identifier.add")(;

activity.EligibleForSearch = false; // don’t use this _and_ CoreSpotlight

activity.EligibleForPublicIndexing = false;

activity.EligibleForHandoff = true;

activity.Title = "Todo Detail";
var attributeSet = new CoreSpotlight.CSSearchableItemAttributeSet ();
attributeSet.DisplayName = "Add Todo";

attributeSet.ContentDescription = NSBundle.MainBundle.LocalizedString ("(new)","");

activity.AddUserInfoEntries (NSDictionary.FromObjectAndKey(new NSString("0"),
ActivityKeys.Id));
activity.ContentAttributeSet = attributeSet;

activity.BecomeCurrent (); // ViewWillDisappear: don’t forget to ResignCurrent()
ViewController
Responding to NSUserActivity
public override bool ContinueUserActivity (UIApplication application,

NSUserActivity userActivity, 

UIApplicationRestorationHandler completionHandler)

{

// Take action based on the activity type

if (userActivity.ActivityType == "my.custom.identifier.add")

{

var uuid = userActivity.UserInfo.ObjectForKey
(CSSearchableItem.ActivityIdentifier);
ContinueNavigation (); // custom implementation
};
}
AppDelegate
Universal Links
Deep link into your app
Great for search, mail-‐outs
https://evolve.xamarin.com/session/56f441a3de91c6253c277bf6
Set up Universal Links
https://evolve.xamarin.com/apple-‐app-‐site-‐association
{
"applinks": {
"apps": [],
"details": [
{
"appID": "XXXX421985.com.xamarin.evolve",
"paths": [ "/session/*" ]
}
]
}
}
Entitlements.plist
App ID
apple-‐app-‐site-‐association
Responding to Universal Links
public override bool ContinueUserActivity (UIApplication application,

NSUserActivity userActivity, 

UIApplicationRestorationHandler completionHandler)

{

if (userActivity.ActivityType == NSUserActivityType.BrowsingWeb)
{

var data = userActivity.WebPageUrl.AbsoluteString;

if (string.IsNullOrWhiteSpace (data) || !data.Contains ("/session/"))

return true;



var id = data.Substring (data.LastIndexOf ("/", StringComparison.Ordinal) + 1);

ContinueNavigation (); // custom implementation
}
}
AppDelegate
3D Touch Quick Actions
Info.plist
Responding to Quick Actions
public UIApplicationShortcutItem LaunchedShortcutItem { get; set; }

public override void OnActivated (UIApplication application)

{

HandleShortcutItem(LaunchedShortcutItem);

LaunchedShortcutItem = null;

}

public override void PerformActionForShortcutItem (UIApplication application,

UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)

{ // app already running

var handled = HandleShortcutItem (shortcutItem);

completionHandler (handled);

}

public bool HandleShortcutItem (UIApplicationShortcutItem shortcutItem)

{
// show required view controller
}

AppDelegate
Xamarin.Forms too!
Evolve app:
-‐ Core Spotlight
-‐ NSUserActivity
-‐ Universal Linking
-‐ 3D Touch
Quick Actions
EVOLVE APP!!
VISUAL STUDIO
one more thing…
Visual Studio on Windows Storyboards
Visual Studio on Windows iOS Simulator
Visual Studio on Windows USB Remoting
Sample Code
github.com/conceptdev/xamarin-‐ios-‐samples > Traveller (﴾iOS)﴿
github.com/conceptdev/xamarin-‐ios-‐samples > To9o (﴾iOS)﴿
github.com/xamarin/xamarin-‐forms-‐samples > Todo (﴾Xamarin.Forms)﴿
github.com/xamarinhq/app-‐evolve > Evolve (﴾Xamarin.Forms)﴿
github.com/nishanil/TouristAttractions > Android app (﴾@nishanil)﴿
Craig Dunn

Xamarin

@conceptdev
THANK YOU!

Weitere ähnliche Inhalte

Was ist angesagt?

Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignJames Montemagno
 
Create great mobile apps with Xamarin, Visual Studio and Azure
Create great mobile apps with Xamarin, Visual Studio and AzureCreate great mobile apps with Xamarin, Visual Studio and Azure
Create great mobile apps with Xamarin, Visual Studio and AzureMatteo Pagani
 
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsDotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsJames Montemagno
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsNish Anil
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean itEric Overfield
 
Mobile web apps in pure Java
Mobile web apps in pure JavaMobile web apps in pure Java
Mobile web apps in pure JavaThomas Mattsson
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitSami Ekblad
 
Intro firebase
Intro firebaseIntro firebase
Intro firebaseMandy Pao
 
Asp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UIAsp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UILohith Goudagere Nagaraj
 
"Designing for the Mobile Web" by Michael Dick (December 2010)
"Designing for the Mobile Web" by Michael Dick (December 2010)"Designing for the Mobile Web" by Michael Dick (December 2010)
"Designing for the Mobile Web" by Michael Dick (December 2010)Mike Brenner
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UIXamarin
 
Introduction to Vaadin Framework
Introduction to Vaadin FrameworkIntroduction to Vaadin Framework
Introduction to Vaadin FrameworkRisto Yrjänä
 
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
Xamarin Dev Days Madrid 2017 -  Xamarin.FormsXamarin Dev Days Madrid 2017 -  Xamarin.Forms
Xamarin Dev Days Madrid 2017 - Xamarin.FormsJavier Suárez Ruiz
 
Building i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinBuilding i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinJoonas Lehtinen
 
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!Masahiko Ebisuda
 

Was ist angesagt? (20)

Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material DesignEvovle 2016 - Everyone Can Create Beautiful Apps with Material Design
Evovle 2016 - Everyone Can Create Beautiful Apps with Material Design
 
Create great mobile apps with Xamarin, Visual Studio and Azure
Create great mobile apps with Xamarin, Visual Studio and AzureCreate great mobile apps with Xamarin, Visual Studio and Azure
Create great mobile apps with Xamarin, Visual Studio and Azure
 
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.FormsDotnetconf - Introduction to Xamarin and Xamarin.Forms
Dotnetconf - Introduction to Xamarin and Xamarin.Forms
 
APAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.FormsAPAC Webinar: Say Hello To Xamarin.Forms
APAC Webinar: Say Hello To Xamarin.Forms
 
Introducing Firebase by Google
Introducing Firebase by GoogleIntroducing Firebase by Google
Introducing Firebase by Google
 
Share point 2013 apps and i mean it
Share point 2013 apps and i mean itShare point 2013 apps and i mean it
Share point 2013 apps and i mean it
 
Mobile web apps in pure Java
Mobile web apps in pure JavaMobile web apps in pure Java
Mobile web apps in pure Java
 
Apex & jQuery Mobile
Apex & jQuery MobileApex & jQuery Mobile
Apex & jQuery Mobile
 
Building mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKitBuilding mobile applications with Vaadin TouchKit
Building mobile applications with Vaadin TouchKit
 
Intro firebase
Intro firebaseIntro firebase
Intro firebase
 
Xamarin microsoft graph
Xamarin microsoft graphXamarin microsoft graph
Xamarin microsoft graph
 
Asp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UIAsp.net mvc - Better User Experience with Kendo UI
Asp.net mvc - Better User Experience with Kendo UI
 
Introduction to xamarin
Introduction to xamarinIntroduction to xamarin
Introduction to xamarin
 
"Designing for the Mobile Web" by Michael Dick (December 2010)
"Designing for the Mobile Web" by Michael Dick (December 2010)"Designing for the Mobile Web" by Michael Dick (December 2010)
"Designing for the Mobile Web" by Michael Dick (December 2010)
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Introduction to Vaadin Framework
Introduction to Vaadin FrameworkIntroduction to Vaadin Framework
Introduction to Vaadin Framework
 
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
Xamarin Dev Days Madrid 2017 -  Xamarin.FormsXamarin Dev Days Madrid 2017 -  Xamarin.Forms
Xamarin Dev Days Madrid 2017 - Xamarin.Forms
 
Intro to vaadin
Intro to vaadinIntro to vaadin
Intro to vaadin
 
Building i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadinBuilding i pad apps in pure java with vaadin
Building i pad apps in pure java with vaadin
 
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!
Microsoft Build2021で登場したハイブリッドクラウド関連情報をまとめてお届け!
 

Ähnlich wie Introduction to iOS 9 (Xamarin Evolve 2016)

Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMichael Dawson
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on AndroidSven Haiges
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development IntroLuis Azevedo
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger FasterChris Love
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersJeremy Lindblom
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedMarvin Heng
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexyananelson
 
Adopting 3D Touch in your apps
Adopting 3D Touch in your appsAdopting 3D Touch in your apps
Adopting 3D Touch in your appsJuan C Catalan
 
Introduction to Spring Boot.pdf
Introduction to Spring Boot.pdfIntroduction to Spring Boot.pdf
Introduction to Spring Boot.pdfShaiAlmog1
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksHector Ramos
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basicsAnton Narusberg
 
Simpler Core Data with RubyMotion
Simpler Core Data with RubyMotionSimpler Core Data with RubyMotion
Simpler Core Data with RubyMotionStefan Haflidason
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Alfredo Morresi
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Filippo Matteo Riggio
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps OfflinePedro Morais
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!Sébastien Levert
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!BIWUG
 

Ähnlich wie Introduction to iOS 9 (Xamarin Evolve 2016) (20)

Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 
CouchDB on Android
CouchDB on AndroidCouchDB on Android
CouchDB on Android
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development Intro
 
Bigger Stronger Faster
Bigger Stronger FasterBigger Stronger Faster
Bigger Stronger Faster
 
Amazon Web Services for PHP Developers
Amazon Web Services for PHP DevelopersAmazon Web Services for PHP Developers
Amazon Web Services for PHP Developers
 
AI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You TypedAI: Mobile Apps That Understands Your Intention When You Typed
AI: Mobile Apps That Understands Your Intention When You Typed
 
Refresh Austin - Intro to Dexy
Refresh Austin - Intro to DexyRefresh Austin - Intro to Dexy
Refresh Austin - Intro to Dexy
 
Adopting 3D Touch in your apps
Adopting 3D Touch in your appsAdopting 3D Touch in your apps
Adopting 3D Touch in your apps
 
Introduction to Spring Boot.pdf
Introduction to Spring Boot.pdfIntroduction to Spring Boot.pdf
Introduction to Spring Boot.pdf
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Parse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & TricksParse London Meetup - Cloud Code Tips & Tricks
Parse London Meetup - Cloud Code Tips & Tricks
 
Android app development basics
Android app development basicsAndroid app development basics
Android app development basics
 
Html indexed db
Html indexed dbHtml indexed db
Html indexed db
 
Simpler Core Data with RubyMotion
Simpler Core Data with RubyMotionSimpler Core Data with RubyMotion
Simpler Core Data with RubyMotion
 
Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)Slightly Advanced Android Wear ;)
Slightly Advanced Android Wear ;)
 
Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2Mobile App Development: Primi passi con NativeScript e Angular 2
Mobile App Development: Primi passi con NativeScript e Angular 2
 
Taking Web Apps Offline
Taking Web Apps OfflineTaking Web Apps Offline
Taking Web Apps Offline
 
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
SharePoint Saturday Belgium 2018 - APIs, APIs everywhere!
 
APIs, APIs Everywhere!
APIs, APIs Everywhere!APIs, APIs Everywhere!
APIs, APIs Everywhere!
 

Mehr von Craig Dunn

Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)Craig Dunn
 
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioEastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioCraig Dunn
 
Wearables with C# and Xamarin
Wearables with C# and XamarinWearables with C# and Xamarin
Wearables with C# and XamarinCraig Dunn
 
What's New Xamarin.Forms 1.3
What's New Xamarin.Forms 1.3What's New Xamarin.Forms 1.3
What's New Xamarin.Forms 1.3Craig Dunn
 
Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms AppCraig Dunn
 
Introduction to iOS with C# using Xamarin
Introduction to iOS with C# using XamarinIntroduction to iOS with C# using Xamarin
Introduction to iOS with C# using XamarinCraig Dunn
 
Introduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinIntroduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinCraig Dunn
 
iOS & Android apps using Parse and Xamarin
iOS & Android apps using Parse and XamariniOS & Android apps using Parse and Xamarin
iOS & Android apps using Parse and XamarinCraig Dunn
 
Cloud-enabling iOS & Android apps with C# (using Xamarin)
Cloud-enabling iOS & Android apps with C# (using Xamarin)Cloud-enabling iOS & Android apps with C# (using Xamarin)
Cloud-enabling iOS & Android apps with C# (using Xamarin)Craig Dunn
 
Cloudy with a Chance of Cross Platform (for Bay.NET)
Cloudy with a Chance of Cross Platform (for Bay.NET)Cloudy with a Chance of Cross Platform (for Bay.NET)
Cloudy with a Chance of Cross Platform (for Bay.NET)Craig Dunn
 
Async Await for Mobile Apps
Async Await for Mobile AppsAsync Await for Mobile Apps
Async Await for Mobile AppsCraig Dunn
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google DevsCraig Dunn
 
PassKit on iOS6
PassKit on iOS6PassKit on iOS6
PassKit on iOS6Craig Dunn
 
OzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousOzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousCraig Dunn
 
OzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousOzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousCraig Dunn
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCraig Dunn
 

Mehr von Craig Dunn (18)

Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)Visual Studio for Mac (AltConf 2017)
Visual Studio for Mac (AltConf 2017)
 
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioEastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
 
Wearables with C# and Xamarin
Wearables with C# and XamarinWearables with C# and Xamarin
Wearables with C# and Xamarin
 
What's New Xamarin.Forms 1.3
What's New Xamarin.Forms 1.3What's New Xamarin.Forms 1.3
What's New Xamarin.Forms 1.3
 
Your First Xamarin.Forms App
Your First Xamarin.Forms AppYour First Xamarin.Forms App
Your First Xamarin.Forms App
 
Introduction to iOS with C# using Xamarin
Introduction to iOS with C# using XamarinIntroduction to iOS with C# using Xamarin
Introduction to iOS with C# using Xamarin
 
Introduction to Android with C# using Xamarin
Introduction to Android with C# using XamarinIntroduction to Android with C# using Xamarin
Introduction to Android with C# using Xamarin
 
iOS & Android apps using Parse and Xamarin
iOS & Android apps using Parse and XamariniOS & Android apps using Parse and Xamarin
iOS & Android apps using Parse and Xamarin
 
Cloud-enabling iOS & Android apps with C# (using Xamarin)
Cloud-enabling iOS & Android apps with C# (using Xamarin)Cloud-enabling iOS & Android apps with C# (using Xamarin)
Cloud-enabling iOS & Android apps with C# (using Xamarin)
 
Cloudy with a Chance of Cross Platform (for Bay.NET)
Cloudy with a Chance of Cross Platform (for Bay.NET)Cloudy with a Chance of Cross Platform (for Bay.NET)
Cloudy with a Chance of Cross Platform (for Bay.NET)
 
Async Await for Mobile Apps
Async Await for Mobile AppsAsync Await for Mobile Apps
Async Await for Mobile Apps
 
Xamarin v.Now
Xamarin v.NowXamarin v.Now
Xamarin v.Now
 
C# everywhere
C# everywhereC# everywhere
C# everywhere
 
Mono for Android... for Google Devs
Mono for Android... for Google DevsMono for Android... for Google Devs
Mono for Android... for Google Devs
 
PassKit on iOS6
PassKit on iOS6PassKit on iOS6
PassKit on iOS6
 
OzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousOzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furious
 
OzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furiousOzAltNet Fast-ANDroid-furious
OzAltNet Fast-ANDroid-furious
 
Cross-platform mobile dev with Mono
Cross-platform mobile dev with MonoCross-platform mobile dev with Mono
Cross-platform mobile dev with Mono
 

Kürzlich hochgeladen

FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRnishacall1
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7Pooja Nehwal
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Pooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceanilsa9823
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceDelhi Call girls
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPsychicRuben LoveSpells
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceanilsa9823
 

Kürzlich hochgeladen (7)

FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCRFULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
FULL ENJOY - 9999218229 Call Girls in {Mahipalpur}| Delhi NCR
 
9892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x79892124323 | Book Call Girls in Juhu and escort services 24x7
9892124323 | Book Call Girls in Juhu and escort services 24x7
 
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
Call US Pooja 9892124323 ✓Call Girls In Mira Road ( Mumbai ) secure service,
 
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun serviceCALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
CALL ON ➥8923113531 🔝Call Girls Gomti Nagar Lucknow best Night Fun service
 
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 71 Noida Escorts >༒8448380779 Escort Service
 
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost LoverPowerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
Powerful Love Spells in Arkansas, AR (310) 882-6330 Bring Back Lost Lover
 
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Saharaganj Lucknow best sexual service
 

Introduction to iOS 9 (Xamarin Evolve 2016)

  • 1. Introduction to iOS… 9 Craig Dunn
 Xamarin
 @conceptdev
  • 2. On the menu? File New App How it works iOS 9 Configuration UI design C# code
  • 3.
  • 5. iPad Multitasking -‐ Adaptive layout -‐ Size classes -‐ Configuration: + LaunchScreen.storyboard + support all iPad orientation options
  • 7. Xamarin’s Unique Approach iOS C# UI Windows C# UI Android C# UI Shared C# Code github.com/xamarinhq/app-‐acquaint
  • 8. Under the Hood Bonnet Native UI Storyboards & XIBs User Interface code (﴾C#)﴿ UIKit, MapKit, CoreLocation … Shared C# Code • Business Logic • Database • Web services • File operations custom bindings Mono (﴾.NET Framework)﴿ • System.Net CocoaPods Objective-‐C NSUrlSession SQLite iOS iOS C# UI Windows C# UI Android C# UI Shared C# Code Xamarin
  • 9. System.Net Choose the Mono managed or the native iOS network stack for WebClient & HttpClient * *
  • 10. Application Transport Security -‐ HTTPS “just works” -‐ HTTP exceptions -‐ HTTP opt-‐out
  • 11. Native Performance Xamarin.iOS does full Ahead Of Time (﴾AOT)﴿ compilation with LLVM to produce an ARM binary for Apple’s App Store.
  • 13. iOS 9 -‐ UIStackView & Localization -‐ Core Spotlight -‐ NSUserActivity / Handoff -‐ Universal linking -‐ 3D Touch + Quick Actions
  • 15. UIStackView Horizontal & vertical orientation Leading and Trailing (﴾not Left and Right)﴿
  • 22. Core Spotlight (﴾Search)﴿ public override void Index (Task t) {
 var attributeSet = new CSSearchableItemAttributeSet (UTType.Text);
 attributeSet.Title = t.Name;
 attributeSet.ContentDescription = t.Notes;
 attributeSet.TextContent = t.Notes;
 var dataItem = new CSSearchableItem (t.Id.ToString(), "co.conceptdev.to9o", attributeSet);
 } // delete items CSSearchableIndex.DefaultSearchableIndex.Delete (new string[] {t.Id.ToString()}, err => {}) // index all-at-once (for reference material) var dataItems = new List<CSSearchableItem>();
 foreach (var session in sessions)
 { Index (session); }
  • 23. Responding to Search public override bool ContinueUserActivity (UIApplication application,
 NSUserActivity userActivity, 
 UIApplicationRestorationHandler completionHandler)
 {
 // Take action based on the activity type
 if (userActivity.ActivityType == CSSearchableItem.ActionType)
 {
 var uuid = userActivity.UserInfo.ObjectForKey (CSSearchableItem.ActivityIdentifier); ContinueNavigation (); // custom implementation }
  • 26. Creating NSUserActivity for Handoff <key>NSUserActivityTypes</key> <array> <string>my.custom.identifier.add</string> <string>my.custom.identifier.edit</string> </array> Info.plist
  • 27. Creating NSUserActivity for Handoff var activity = new NSUserActivity ("my.custom.identifier.add")(;
 activity.EligibleForSearch = false; // don’t use this _and_ CoreSpotlight
 activity.EligibleForPublicIndexing = false;
 activity.EligibleForHandoff = true;
 activity.Title = "Todo Detail"; var attributeSet = new CoreSpotlight.CSSearchableItemAttributeSet (); attributeSet.DisplayName = "Add Todo";
 attributeSet.ContentDescription = NSBundle.MainBundle.LocalizedString ("(new)","");
 activity.AddUserInfoEntries (NSDictionary.FromObjectAndKey(new NSString("0"), ActivityKeys.Id)); activity.ContentAttributeSet = attributeSet;
 activity.BecomeCurrent (); // ViewWillDisappear: don’t forget to ResignCurrent() ViewController
  • 28. Responding to NSUserActivity public override bool ContinueUserActivity (UIApplication application,
 NSUserActivity userActivity, 
 UIApplicationRestorationHandler completionHandler)
 {
 // Take action based on the activity type
 if (userActivity.ActivityType == "my.custom.identifier.add")
 {
 var uuid = userActivity.UserInfo.ObjectForKey (CSSearchableItem.ActivityIdentifier); ContinueNavigation (); // custom implementation }; } AppDelegate
  • 29. Universal Links Deep link into your app Great for search, mail-‐outs https://evolve.xamarin.com/session/56f441a3de91c6253c277bf6
  • 30. Set up Universal Links https://evolve.xamarin.com/apple-‐app-‐site-‐association { "applinks": { "apps": [], "details": [ { "appID": "XXXX421985.com.xamarin.evolve", "paths": [ "/session/*" ] } ] } } Entitlements.plist App ID apple-‐app-‐site-‐association
  • 31. Responding to Universal Links public override bool ContinueUserActivity (UIApplication application,
 NSUserActivity userActivity, 
 UIApplicationRestorationHandler completionHandler)
 {
 if (userActivity.ActivityType == NSUserActivityType.BrowsingWeb) {
 var data = userActivity.WebPageUrl.AbsoluteString;
 if (string.IsNullOrWhiteSpace (data) || !data.Contains ("/session/"))
 return true;
 
 var id = data.Substring (data.LastIndexOf ("/", StringComparison.Ordinal) + 1);
 ContinueNavigation (); // custom implementation } } AppDelegate
  • 32. 3D Touch Quick Actions Info.plist
  • 33. Responding to Quick Actions public UIApplicationShortcutItem LaunchedShortcutItem { get; set; }
 public override void OnActivated (UIApplication application)
 {
 HandleShortcutItem(LaunchedShortcutItem);
 LaunchedShortcutItem = null;
 }
 public override void PerformActionForShortcutItem (UIApplication application,
 UIApplicationShortcutItem shortcutItem, UIOperationHandler completionHandler)
 { // app already running
 var handled = HandleShortcutItem (shortcutItem);
 completionHandler (handled);
 }
 public bool HandleShortcutItem (UIApplicationShortcutItem shortcutItem)
 { // show required view controller }
 AppDelegate
  • 34. Xamarin.Forms too! Evolve app: -‐ Core Spotlight -‐ NSUserActivity -‐ Universal Linking -‐ 3D Touch Quick Actions EVOLVE APP!!
  • 36. Visual Studio on Windows Storyboards
  • 37. Visual Studio on Windows iOS Simulator
  • 38. Visual Studio on Windows USB Remoting
  • 39. Sample Code github.com/conceptdev/xamarin-‐ios-‐samples > Traveller (﴾iOS)﴿ github.com/conceptdev/xamarin-‐ios-‐samples > To9o (﴾iOS)﴿ github.com/xamarin/xamarin-‐forms-‐samples > Todo (﴾Xamarin.Forms)﴿ github.com/xamarinhq/app-‐evolve > Evolve (﴾Xamarin.Forms)﴿ github.com/nishanil/TouristAttractions > Android app (﴾@nishanil)﴿