a swift introduction to ios 10

39
JAMES SUGRUE A SWIFT INTRODUCTION TO IOS 10 @SUGRUE

Upload: james-sugrue

Post on 12-Apr-2017

105 views

Category:

Software


2 download

TRANSCRIPT

Page 1: A Swift Introduction to iOS 10

JAMES SUGRUEA SWIFT INTRODUCTION TO IOS 10

@SUGRUE

Page 2: A Swift Introduction to iOS 10

SIRIKIT

Page 3: A Swift Introduction to iOS 10

▸ VoIP calling

▸ Messaging

▸ Payments

▸ Photo

▸ CarPlay (automotive vendors only)

▸ Restaurant reservations (requires additional support from Apple)

DOMAINSSIRIKIT

▸ Workouts

▸ Ride booking

▸ CarPlay (automotive vendors only)

▸ Restaurant reservations (requires additional support from Apple)

Page 4: A Swift Introduction to iOS 10

▸ Data Model

▸ Networking

▸ User Interface

▸ Decision Making Logic

PREPARATIONSIRIKIT

If you are adding SiriKit to an existing app, consider Embedded Frameworks

Page 5: A Swift Introduction to iOS 10

SIRIKIT ADD EXTENSION

Page 6: A Swift Introduction to iOS 10

SIRIKIT EXTENSIONS

Page 7: A Swift Introduction to iOS 10

SIRIKIT ENABLING SIRI FOR YOUR APP▸ NSSiriUsageDescription

key in Info.plist to describe what your app plans to do with Siri

▸ Call requestSiriAuthorization to display the alert to user.

Page 8: A Swift Introduction to iOS 10

SIRIKIT INTENTSIntentHandler inherits from INExtension and then specific Intent handlers

Page 9: A Swift Introduction to iOS 10

SIRIKIT INTENTSDeclare intents supported by your extension in Info.plist

▸ Each Intent that you support will need to be listed in IntentsSupported

▸ Use IntentsRestrictedWhileLocked to prevent access to features when the phone is locked

Page 10: A Swift Introduction to iOS 10

SIRIKIT RESOLVE, CONFIRM, HANDLE

Page 11: A Swift Introduction to iOS 10

SIRIKIT RESOLVE, CONFIRM, HANDLE

Page 12: A Swift Introduction to iOS 10

SIRIKIT MAPS

Page 13: A Swift Introduction to iOS 10

MAPS

Page 14: A Swift Introduction to iOS 10

APPSIMESSAGE

Page 15: A Swift Introduction to iOS 10

IMESSAGE APP STORE

Page 16: A Swift Introduction to iOS 10

IMESSAGE STANDALONE APPS

Page 17: A Swift Introduction to iOS 10

IMESSAGE EXTENDING EXISTING APPS

Page 18: A Swift Introduction to iOS 10

IMESSAGE CUSTOM INTERFACE

Page 19: A Swift Introduction to iOS 10

IMESSAGE CUSTOM INTERFACE

MSMessagesAppViewController inherits from UIViewController

Track messages with didReceive, didStartSending, didCancelSending

Page 20: A Swift Introduction to iOS 10

IMESSAGE CUSTOM INTERFACE

Page 21: A Swift Introduction to iOS 10

STICKERSIMESSAGE

Page 22: A Swift Introduction to iOS 10

IMESSAGE APP STORE

Page 23: A Swift Introduction to iOS 10

IMESSAGE STICKER PACK

Page 24: A Swift Introduction to iOS 10

IMESSAGE STICKER PACK

Page 25: A Swift Introduction to iOS 10

IMESSAGE STICKER PACK

Page 26: A Swift Introduction to iOS 10

IMESSAGE STICKER PACK

Page 27: A Swift Introduction to iOS 10

“LINE SOLD $268 MILLION WORTH OF STICKERS LAST YEAR AMID ASIA’S MESSAGING BOOM”

Page 28: A Swift Introduction to iOS 10

ANIMATIONS

Page 29: A Swift Introduction to iOS 10

ANIMATIONS

▸ UIViewPropertyAnimator create reusable animations and trigger when required

▸ Animate changes to views and dynamically modify your animations before they finish

Page 30: A Swift Introduction to iOS 10

ANIMATIONS DEMO

Page 31: A Swift Introduction to iOS 10

USER NOTIFICATIONS

Page 32: A Swift Introduction to iOS 10

NOTIFICATION SERVICENOTIFICATIONS

Page 33: A Swift Introduction to iOS 10

SPEECH RECOGNITION

Page 34: A Swift Introduction to iOS 10

▸ Import Speech Framework

▸ SFSpeechRecognizer handles recognition in a specific locale

▸ SFSpeechAudioBufferRecognitionRequest provides audio input to the recogniser

▸ SFSpeechRecognitionTask provides result of the request, allows cancelling task

▸ AVAudioEngine provides audio input

REQUIRED PARTSSPEECH RECOGNITION

Page 35: A Swift Introduction to iOS 10

USER PERMISSION REQUIRED!

TheApp

Page 36: A Swift Introduction to iOS 10

SPEECH RECOGNITION LIMITATIONS▸ “Devices are limited by the number of recognitions that can

be performed in one day”

▸ “Individual apps may be throttled globally”

▸ “Speech recognition can place a relatively high burden on battery life and network usage”

▸ “Utterance audio duration is limited to about one minute, which is similar to the limit for keyboard-related dictation”

https://developer.apple.com/reference/speech

Page 37: A Swift Introduction to iOS 10

SWIFT 3.0

Page 38: A Swift Introduction to iOS 10

SWIFT 3.0 CHANGES

▸ Access control changesprivate, fileprivate, public and open

▸ Verbs & NounsmyArray.sort() //returns sorted version the

▸ User Interface

▸ Decision Making Logic

Page 39: A Swift Introduction to iOS 10

JAMES SUGRUEA SWIFT INTRODUCTION TO IOS 10

@SUGRUE