revue des annonces wwdc2015

68
WWDC 2015 CocoaHeads Paris Juin 201 5

Upload: cocoaheads-france

Post on 30-Jul-2015

1.011 views

Category:

Software


1 download

TRANSCRIPT

WWDC 2015

CocoaHeads ParisJuin 2015

App distribution Xcode OSX WatchOS iOS Swift 2.0 & Objc

Agenda

App distribution

by Nicolas Lauquin

• New Apple Developer Program

• One Membership for all Apple platforms

Membership

• Faster downloads and more space for other apps and content provides a better user experience.

• lets you… « occupy minimum disk space, and accommodate future updates that can be applied by Apple. »

App Thining

App Slicing• Distribute only executable architecture and

resources that are needed for the target device

• Resources are sliced according to their resolution and device family.

• Xcode simulates slicing during development so you can create and test variants locally

• xcarchive includes the full version of your app but allows you to export variants from the archive.

• You must use the asset catalog in order for resources to be sliced.

Bitcode• Bitcode is an intermediate LLVM representation

of a compiled program.

• « Apps you upload to iTunes Connect that contain bitcode will be compiled and linked on the App Store. Including bitcode will allow Apple to re-optimize your app binary in the future without the need to submit a new version of your app to the store. »

• For WatchOS apps, bitcode is required

• For iOS apps, bitcode is the default, but optional. If you provide bitcode, all apps and frameworks in the app bundle need to include bitcode.

On Demand Resources• Host additional content for your app on the

iTunes App Store repository,

• allows the app to fetch resources as needed using asynchronous download and installation.

• Asset Catalog can tag asset with keywords

• Asset Catalog supports media (image,sound)

• The App Store hosts the resources on Apple servers and manages the downloads for you

Q&A

Xcode 7by Karim-Pierre Maalej

Storyboard References

Playground

• Multiple pages • Embedded resources

IB - Asset catalog

Testing

Address sanitizer 

User Interface Testing

Code Coverage 1/2

Code Coverage 2/2

Crash Logs

And many more…

Q&A

OSX 10.11by Stéphane Sudre

System Integrity Protection

NSCollectionView

Windows Tiling

Metal

NSTableView

Force Touch Crash logs (MAS)

Thermal State

Q&A

WatchOS 2.0by Benoit Capallere @UserADgents

New WatchKit Architecture

Extension  on  watch  side:    • speed  and  responsiveness  • use  without  iPhone  (wifi  also)  • access  to  hardware  

Watch Connectivity

More interaction between Watch and iPhone:

• New component in API for data transport

• Able to send a message from one to other to open an application

New controller•Add  controller  «  WInterfacePicker  »  use  with  digital  crown  •Styles:  •  list  style  •  stack  style  •  image  sequence

Animation and layoutPossibility  to  manipulate  a  component  with  Core  AnimaHon  to  modify  it  dynamically

Alert

New screen available used to do like an « AlertView » to ask a specific answer.

Pass Kit

Possibility to interact with Pass Pass Kit to show it and also to create one.

Clock Kit

• Custom « Complication »

• Resizable

• Work has a « Timeline » to show data with time.

Accessible from the watch• Core Motion : accelerometer

• Core Location : retrieve location

• Health Kit : use data

• Security : keychain

• MapKit : launch guidance

• Contacts : with new API iOS 9

• Event Kit

Haptic engineAbility  to  say  what  touch  means  in  a  certain  context

Audio / VideoAbility to :

• Record audio file

• Access to speaker

• Play a vidéo

• Play a sound in background when application suspended

Q&A

iOS 9by Nicolas Lauquin

Compatibility

• Same iOS 8 devices

• Need to support 3,5" screens

• Target OTA device with low space (iOS9=1,8Go vs iOS8= 4,6Go)

Battery

• Battery lifeimproved backlight algorithms, facedown detection, adaptive sleep delays, low power idle -> 1 hour battery extension

• Low power mode preventing unnecessary network activity, animation reduced, disabled background download -> 3 hours usage extension-> Think to test with this mode

Multitasking

• Allow to run 2 apps at the time on an iPad • 3 elements : Slide Over, Split View, and Picture in Picture.

SideOver & SplitView

Requirements SplitView

• Base SDK to “Latest iOS” • Use a LaunchScreen.storyboard • Enable all interface orientation • Use Adaptive UI with SizeClass & Autolayout

Picture In Picture

• New «  Audio, AirPlay, and PiP» in background Capabilities • AVPlayerViewController class, which automatically displays a PiP button • AVPictureInPictureController : for own view controller and custom user interface • WKWebView class also supports PiP in iOS 9

ImpactsImpacts • Before iOS 9 -> full usage CPU, GPU, memory, I/O, and hardware resources.

• In iOS 9, this changes. « It’s critical for every app to use resources efficiently so a user’s iPad experience is fluid and responsive.

• Under memory pressure, the system preemptively quits the app that’s consuming the most memory.

• Consider size and Size Class instead of Orientation

Search 1/2• CoreSpotlight: make app content

searchable-> Like a database API to add, retrieve, update content -> CoreSpotlight extension: update the index or verify the validity of an item even if app is not running.

• NSUserActivity: make app activities and states searchable -> Create activity associated with title, keyworks, data that is searchable and restorable.

Search 2/2 • Web markup: web crowler index it

and can provide result to your app content in Search results-> Need to add markup to annotate your web content

• Universal Links: your app can register to open web links directly, bypassing Safari.-> same mechanism that powers Handoff-> a trust relationship between the app and the website is established by adding a signed json file (website) & entitlement (in the app)

And many more…• AppTransportSecurity: https only & TLS1.2 -> if not

declare domain in Info.plist

• Full RTL support

• Contacts/ContactsUI : new API Object-Oriented fashion

• NSStackView

• …

Q&A

Swift 2.0 & Objective-Cby Grégoire Lhotellier

Objective-C

• GenericsNSArray<UIImage *> *images; NSDictionary<NSString *, NSURL *> *resourcesByName;

• kindof typeObjects declared as __kindof types behave like a mix of ‘id’ and a specific object type. Must object type or a subclass of it.

Objective-C

Objective-C

What’s new in Swift 2.0?

Open Source 🎉

iOS dev -> fullstack dev Protocol Extension 😍

fp? oop? No, POP!

What’s new in Swift 2.0?

Exceptions

Exceptions

Exceptions

Exceptions

Generics 🔫 Protocol Extension

StdLib: free functions 101 -> 77 sorted(elements, f) -> elements.sort(f) count(string) -> string.count

Migration Swift 1.x -> 2.0

Exceptions Methods with NSError** -> do / try / catch

Migration Swift 1.x -> 2.0

Option sets .FlexibleWidth | .FlexibleHeight [.FlexibleWidth, .FlexibleHeight] none -> []

Migration Swift 1.x -> 2.0

var -> let 💣

warning unused variable 🎉

println -> print count(string) -> string.characters.count

Migration Swift 1.x -> 2.0

where everywhere Generated Interface if case .A = a {}, why so ugly? 😭

exceptions, why no type? 😐

Misc

Q&A

Apple documentation & Apple WWDC 2015 Videos

Sources