MacKuba

Kuba Suder's blog on iOS & Mac development

New stuff from WWDC 2015

Categories: Cocoa, Mac, iPhone 0 comments

Here’s my own list of the interesting stuff announced during this year’s WWDC, collected from the keynotes, various Apple docs, blog posts and tweets.

If you’re planning to watch the videos, I really recommend this Mac app that helps you download and watch them: https://github.com/insidegui/WWDC.

(This was originally posted on Gist at https://gist.github.com/mackuba/15994186a4f9d7da3137.)


OS X El Capitan

http://www.apple.com/osx/elcapitan-preview/

  • split view – two apps side by side on full screen
  • improved Mission Control
  • shaking the mouse highlights the cursor
  • smarter Spotlight (Siri-like results, natural language queries, resizable window)
  • Mail: tabbed compose window as a popup in full screen mode; autosuggests new contacts and events; swipe gestures
  • Notes: updated UI, supports checklists and embedded media, syncs through iCloud, attachment browser
  • Photos: sorting albums by date
  • Safari: pinned sites, detect and mute audio in tabs
  • Maps: public transit
  • significant performance improvements, mostly thanks to the Metal framework
  • new beach ball cursor
  • new system font (San Francisco)
  • Safari developer tools: responsive design mode
  • System Integrity Protection – limited some privileges of admin accounts (can’t modify system files or access system processes) – can be disabled with a special utility
  • redesigned disk utility, new color picker, option to autohide menu bar

iOS 9

https://www.apple.com/ios/ios9-preview/

  • more intelligent Siri
  • proactive suggestions in various places
  • more intelligent search feature, extensible by apps
  • iPad multitasking – slideover, split view, Picture in Picture
  • Notes: supports checklists and embedded media, sketch drawing, syncs through iCloud
  • Passbook renamed to Wallet, can hold reward cards etc.
  • Maps: public transit, finding places nearby
  • News app
  • iCloud Drive app that shows all contents of your iCloud drive
  • “Move to iOS” app (in the App Store) for migrating from Android
  • iPad keyboard – copy/paste buttons, dragging on the keyboard makes it select text
  • iPad external keyboard – app switching
  • new app switcher
  • lowercase keyboard
  • low power mode
  • smaller download size for OS updates and less free space required to install
  • passcodes can be 6 digits long
  • to log in on a new device, you need to enter a verification code shown on one of your existing devices
  • full right to left support – in RTL mode, everything is right to left – system controls, layout, gestures, navigation, tab bars etc.
  • optimized UI, up to 1h more of battery usage
  • notifications don’t light up the screen if the iPhone is lying face down
  • popovers now drop a slight shadow around them on the underlying view
  • “share” option added to the popover shown when selecting text

watchOS 2

https://www.apple.com/watchos-2-preview/

  • new watch faces (photo, album, timelapse)
  • time travel feature – shows events and predicted status of various things (e.g. weather) in the future or in the past if you’ve missed something
  • night stand mode – landscape display, buttons act as “snooze” and “off”
  • public transit support in maps and siri
  • siri can show glances
  • watch is protected by Activation Lock on startup

Foundation

https://developer.apple.com/library/prerelease/mac/releasenotes/Foundation/RN-Foundation/index.html

  • NSURLConnection is deprecated in favor of NSURLSession
  • App Transport Security: non-encrypted HTTP connections are now blocked by default unless you explicitly add an exception to the plist file (doc)
  • IPv6 support is now required
    • using standard library classes like NSURLSession is recommended
    • avoid hardcoding IP addresses
    • for testing: OSX can create an IPv6 network for the iPhone
  • assigning nil to an NSMutableDictionary key through a subscript now removes the key (e.g. dict[@"key"] = nil)
  • NSNotificationCenter now automatically handles removing deallocated observers (except block-based ones) so you don’t need to unregister manually in dealloc/deinit
  • lzfse – new compression algorithm available for compressing data
  • NSPersonNamesComponentFormatter – for displaying people’s names in a localized way
  • methods for percent-escaping URL strings were deprecated and replaced with new ones

OS X SDK

https://developer.apple.com/osx/pre-release/

https://developer.apple.com/library/prerelease/mac/releasenotes/MacOSX/WhatsNewInOSX/Articles/MacOSX10_11.html

  • Metal & MetalKit – a framework for doing various operations on the GPU
  • photo app extensions allow you to add filters and other edit tools to Photos
  • Safari extensions can now block content (old way of intercepting content in extensions is deprecated)
  • web APIs in Safari for accessing Force Touch trackpad
  • MapKit can now be used in apps outside Mac App Store
  • APIs to support force touch trackpads
  • NSLayoutGuide – a kind of lightweight subview for defining an AutoLayout section which isn’t actually a real view
  • NSLayoutAnchor – a helper for creating AutoLayout constraints in code

iOS SDK

https://developer.apple.com/ios/pre-release/

https://developer.apple.com/library/prerelease/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS9.html

http://www.hackingwithswift.com/ios9

  • App Thinning, App Slicing – optimizes app download for the given device – can choose e.g. only 64-bit code, only 2x images etc. (doc)
  • On-Demand Resources: files can be hosted in the App Store separately from the app and downloaded only on demand (Xcode simulates this during debugging, streaming the resources to the device) (doc)
  • Bitcode – code is submitted as intermediate LLVM representation that can be later converted by the App Store to new CPUs and architectures (required for watchOS, recommended and enabled by default for iOS)
  • universal app links (http) – clicking registered http links opens your app instead of Safari, intended as a replacement for custom URL schemes
  • apps need to declare used external URL schemes in Info.plist, old apps can only use canOpenURL 50 times to prevent abuse
  • UIStackView – a layout container for arranging views vertically or horizontally
  • SFSafariViewController – a view controller for showing a built-in browser inside your app (shares cookies and data with Safari)
  • NSLayoutAnchor – a helper for creating AutoLayout constraints in code
  • search API (Core Spotlight, search extension and some other ways)
  • GameplayKit – algorithms and data structures that can be useful for games (but not only) (doc)
  • Model I/O – lighting for 3d models
  • ReplayKit – lets you record gameplay screencasts inside the app
  • notifications can allow a text response (UIUserNotificationActionBehaviorTextInput)
  • app’s iCloud documents can be opened in place inside iCloud Drive app (LSSupportsOpeningDocumentsInPlace)
  • using adaptive layout / size classes is recommended to support iPad multitasking
  • Picture in Picture – support via WKWebView and AVPlayerViewController, and a new AVPictureInPictureController
  • Core Image: text detection feature (no OCR, just detects that there is a text)
  • it’s now allowed to submit 64-bit only apps
  • touch prediction in UIKit
  • full support for right-to-left languages (layout mirroring)
  • possibility to define keyboard shortcuts for external keyboards (addKeyCommand)

watchOS SDK:

https://developer.apple.com/watchos/pre-release/

https://developer.apple.com/library/prerelease/watchos/documentation/General/Conceptual/AppleWatch2TransitionGuide/

  • native apps – still supplied as an iOS extension, no completely custom views, but the code runs on the watch
  • “complications” – tiny widgets that can be displayed inside various watch faces (ClockKit)
    • you create a timeline up front – what to show at what time, and watchOS uses this to show up to date data immediately when the screen turns on (also used for time travel – forward and backward)
    • scheduled updates – lets you update the data in the timelines at scheduled intervals
    • push updates – via push notifications
  • apps can access the Internet through known WiFi networks w/o an iPhone
  • apps can access microphone, HealthKit including heart rate, HomeKit, accelerometer, taptic engine, crown, play audio and video, record audio, make phone calls
  • a lot of well known frameworks are available like CoreGraphics, CoreLocation, CoreMotion, CoreData etc.
  • WatchConnectivity framework for communication between the extension and the iPhone app
  • NSURLSession can be used directly on the watch even if the iPhone is out of range
  • WKInterfacePicker control for scrolling through elements with the crown

Developer tools

Swift 2.0

https://developer.apple.com/swift/

https://mikeash.com/pyblog/friday-qa-2015-06-19-the-best-of-whats-new-in-swift.html

http://airspeedvelocity.net/2015/06/09/changes-to-the-swift-standard-library-in-2-0-beta-1/

http://www.russbishop.net/swift-2-0

New/updated ebook is also available.

  • Swift goes open source and multi-platform! (in autumn, under a permissive license, available for Linux for now)
  • new error handling features (throw, throws & rethrows, try, do/catch, ErrorType)
    • http://www.sunsetlakesoftware.com/2015/06/12/swift-2-error-handling-practice
    • http://robnapier.net/re-throws
    • https://gist.github.com/nicklockwood/21495c2015fd2dda56cf
  • defer statement (like finally in some languages)
  • guard statement – for checking a precondition before continuing execution of the block
    • http://ericcerney.com/swift-guard-statement/
  • dowhile is renamed to repeatwhile
  • protocols now can have default method implementations and helper methods (i.e. they work as mixins)
    • http://nomothetis.svbtle.com/the-ghost-of-swift-bugs-future
  • protocols can now be extended with extensions, also with conditions limiting them to a subset of implementing types
  • pattern matching with case can now be used in other statements like if, forin etc.
    • http://natashatherobot.com/swift-2-pattern-matching-with-if-case/
    • http://natashatherobot.com/swift-2-for-in-filtering/
  • new optional pattern for matching optionals: case let foo?
    • http://natashatherobot.com/swift-2-pattern-matching-unwrapping-multiple-optionals/
  • where conditions can be used in forin loops and in the new ifcase condition
  • global functions now follow the same rules for parameter names as methods (i.e. all attributes except the first need to be explicitly used when calling), and the # shorthand for reusing local parameter name for the external name is removed
  • non-generic classes can inherit from generic classes
  • Swift closures can now be passed to C functions that expect function pointers in arguments
  • API availability checking (if #available and @available attribute) + compile errors if you try to use a new API targetting an older OS
  • new attributes: @convention and @warn_unused_result
  • bit-map enums (e.g. .Alert | .Badge) are now imported as a new OptionSetType type and handled more like a collection
  • a lot of new methods added to CollectionType like map, filter etc., global functions like map removed
  • println renamed to print, pass appendNewLine: false to don’t add a \n
  • number types now have initializers taking a String argument
  • String is no longer a collection
  • fix-it suggestions about changing var to let when possible
  • Markdown syntax supported in documentation comments
  • various optimizations to compile time and generated code performance (e.g. for closures executed in place)

Xcode 7 & dev portals

https://developer.apple.com/xcode/

https://developer.apple.com/library/prerelease/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_7_0.html

  • Mac, iOS and Safari Developer Programs joined into a single Apple Developer Program ( link & link)
  • Developer Program is no longer required to run apps from Xcode on your iOS device (!)
  • in the Developer Portal, you can now register 100 devices of each kind separately (e.g. 100 iPhones, 100 iPods etc.) – including Apple TVs!
  • iTunes Connect now allows adding a single address to multiple organizations like Developer Program did
  • TestFlight: 2000 external testers, 60-day builds
  • new developer forums at forums.developer.apple.com, open to everyone without logging in
  • framework for writing UI tests + a test action recording tool (default app templates now automatically add a UI test target)
  • code coverage reporting
  • migration tool for migrating Swift code to 2.0
  • Address Sanitizer – a tool that helps you detect improper memory usage bugs
  • Find –> Call Hierarchy for finding method calls in potential stack traces
  • integrated crash log browser for iOS and OSX
  • header file view assistant mode for viewing Swift classes without implementations
  • energy usage gauge for iOS apps
  • animation and level editor for SceneKit and SpriteKit
  • IB support for segues between storyboards and placeholders for scenes from other storyboards
  • ObjC generics (NSArray<NSString*>*) – not actually enforced, mostly for Swift compatibility
  • various improvements to playgrounds, including possibility to have multiple pages
  • CloudKit Web Services – a web service and JS library for accessing iCloud from web apps using JavaScript (includes OAuth-style login with Apple ID)

Other

  • Apple Pay expands to UK
  • Apple Music launches in 100+ countries, first 3 months free (from the moment of signup)

Leave a comment

*

*
This will only be used to display your Gravatar image.

Are you a human? (yes/no) *