WWDC - 2015

Summarised noted, mostly for myself, of interesting 2015 WWDC sessions. I'll update them as I watch

State of the Platform

App thinning

  • Should happen automatically.
  • Downloadable resource/bundles from iTunes Connect

BitCode

  • Optimises binary at submission time.
  • xCode 7 setting should be enabled by default.
watchOS2

Bringing native watch apps in watchOS2

Complications

  • Data is driven by a timeline so that it's accurate at the time of raising your wrist
  • Time line can change via "scheduled updates" i.e. weather
  • Complication can be updated by a push message
  • Timeline feature

Notification

  • Full screen notifications
  • With custom action buttons

Foundation Technologies

Security

  • App transport security
  • Automatically enforce best practise
  • NSURLSession has it be default, might need to add url exception list incase server is not ready.

IPV6

  • Mac can emulate IPV6 network via personal hotspot.
  • All apps must be IPV6 compliant for submission on iOS9

Internationalization

  • NSPersonalNameFormatter, can give first name as per country.
  • Left-to-right languages is now left-to-right on the entire UI. Should be for free if using standard components.

Universal Links

  • Host a file on website listing url application handles natively
  • NSUserActivity wraps up the link

Search

  • Three ways to index content
  • App indexing extension, using by CoreSpot to periodically index your app's content
  • NSUserActivity, used to record what your user has been up to.
  • Web Markup, indexed by Apple's web crawler.

Multitasking

  • Must use adaptive layout, size classes, dynamic type for text and autolayout
  • Size classes can change regular|compact to compact|compact as you resize the split view

SWIFT

  • New error handling, try/catch
  • Availability checking to check if features/functions are available to the iOS
  • Protocol programming??
  • guard to check conditions and bail on function
  • generics in objc-c

xCode 7

  • header file view of SWIFT code
  • rich text documentation
  • playgrounds
  • stackview
  • new profiler/debugger helps with energy usage
  • new instruments
  • address sanitiser to help debug memory
  • test apis
  • test performance
  • user interface testing
  • code coverage

Introducing watchOS 2.0

What's new in WatchKit

New crown activated selectors.

  • List, stack and sequence selectors.
  • Last two work only with graphics.
  • Background can move in relation to the selection index.

Animation

Haptic engine

  • Access to enumeration of types of haptic feedback to use.

Audio recorder and speaker access.

Video playback

  • Local or off the network.

Audio playback

  • "Long form audio" can be played with something similar to AVFoundation
  • Difference is music to be played is passed off to system to play to enhance battery life.
  • Allows playback even if application is not running

New Alert API

Improved visuals

New/Improved SDKs in watchOS

ClockKit

WatchConnectivity

  • Normal NSURLSession stuff
  • WatchConnectivity to link phone and watch. For uploading data from phone to watch (or visa versa).
  • WatchConnectivity uses Application Context to send Dictionary data to both.
  • FileTransferAPI to send larger files.
  • SendMessageAPI can be used to send message from watch to phone, waking up the application. Sending the other way doesn't wake up the watch app.
  • WWDC WatchConnectivity

CoreMotion

  • Enhanced to provide real time motion data to running app.
  • Can provider motion data to app not running and batch send the data when app opens.

Security

  • When watch is removed from wrist it becomes locked.

Introducing Search APIs

Three new related search APIs

  • NSUserActivity for viewed public app content.
  • CoreSpotlight Any app generated content.
  • Web Markup App content on web.
NSUserActivity

NSUserActivity objects are created as user is using your app and added to the On-Device Index.

NSUserActivity has properties to describe

  • Title and keywords: Set<String>
  • userInfo used to repopulate the application state
  • contentAttributeSet a set of attributes allowing iOS to categorise and display the activity better in the search results.
  • expirationDate if this activity expires.
  • isActive informs system this is the active user activity.

If an NSUserActivity is designated as public, when it's index (via the user using the app) this activity is indexed by the iCloud index and the activity is available to all users via Spotlight. If NSUserActivity contains web url, then it's available in Safari such as well.

Making NSUserDefaults public doesn't mean it's indexed. Only indexed if searched in spotlight and engaged by many users.

By adding NSUserActivity to the app you get

  • Hand-off
  • Siri reminder Remind me about this as demo'ed.
CoreSpotlight

Create CSSearchableItem, add metadata via CSSearchableItemAttributeSet and then add to CSSearchableIndex datastore.

When user taps on search result, the unique id of the CSSearchableItem is returned and that item can be retrieved from the CSSearchableIndex datastore.

The CSSearchableIndex

  • Allows for updating and deleting of CSSearchableItem
  • Batching of updates for large indexes
  • CSSearchableIndexDelegate and Extension so that the index can communicate with your app when in foreground and background.
Web Markup

Applebot has been crawling the web looking for mobile deep links. Applebot searches supports popular standards such as Smart App Banners, Twitter Cards and Facebook's App Links.

New iOS9, universal links, link back to your application with normal looking HTML. See Seamless Linking to Your App

Ranking

The NSUserActivity ranking is determined by many factors

  • engagement by many users is key
  • speed of linking back to app important. Minimal loading times, view controller presentation and no hurdles such as login.