What's new in iOS 5? (and why should I care?) vikram@local.ch - - PowerPoint PPT Presentation

what s new in ios 5
SMART_READER_LITE
LIVE PREVIEW

What's new in iOS 5? (and why should I care?) vikram@local.ch - - PowerPoint PPT Presentation

What's new in iOS 5? (and why should I care?) vikram@local.ch Vikram Kriplaney vikram@iphonso.com @krips Friday, October 14, 11 iCloud Storage API Provides a sandbox for each app Synchronizes data and files between cloud and


slide-1
SLIDE 1

What's new in iOS 5?

(and why should I care?)

Vikram Kriplaney vikram@local.ch vikram@iphonso.com @krips

Friday, October 14, 11

slide-2
SLIDE 2

iCloud Storage API

  • Provides a sandbox for

each app

  • Synchronizes data and

files between cloud and devices

  • Document store
  • Key-value store

Friday, October 14, 11

slide-3
SLIDE 3

iCloud Storage API

  • Notifies apps of changes
  • Resolves conflicts
  • Atomic
  • Runs in background
  • 5Gb free

+10Gb €16 +20Gb €32 +50Gb €80

Friday, October 14, 11

slide-4
SLIDE 4

iCloud Metadata

  • Metadata is always

synced with iCloud

  • Devices always push
  • Devices pull when

appropriate

Friday, October 14, 11

slide-5
SLIDE 5

iCloud Storage API

  • NSFileManager
  • NSMetadataQuery
  • UIDocument
  • Key-Value Store
  • Windows API (really)

Friday, October 14, 11

slide-6
SLIDE 6

NSFileManager

  • Move files into sandbox
  • Check if file exists in

iCloud

  • Locate sandbox

directory

  • Publish a URL for

sharing

Friday, October 14, 11

slide-7
SLIDE 7

UIDocument

  • Asynchronous reading

and writing

  • Coordinated iCloud I/O
  • Conflict detection and

resolution

  • Safe (atomic) saving
  • Auto-save

Friday, October 14, 11

slide-8
SLIDE 8

NSMetadataQuery

  • Async discovery and

notification

  • File/iCloud attributes

(NSMetadataItem)

NSMetadataQuery *q = [NSMetadataQuery new]; q.predicate = [NSPredicate predicateWithFormat:@"@K LIKE %@", NSMetadataItemFSNameKey, @"pepe"]; q.searchScopes = [NSArray arrayWithObject:NSMetadataQueryUbiquitousDocumentsScope]; q.delegate = self; [q startQuery];

Friday, October 14, 11

slide-9
SLIDE 9

NSUbiquitousKeyValueStore

  • Reserved quota per app
  • Change notifications
  • No conflicts: Last change wins
  • Must configure app entitlement

com.apple.developer.ubiquity-kvstore- identifier

[[NSUbiquitousKeyValueStore defaultStore] setObject:@"Pepe" forKey:@"userName"]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(kvStoreChanged:) name: NSUbiquitousKeyValueStoreDidChangeExternallyNotification

  • bject:nil];

Friday, October 14, 11

slide-10
SLIDE 10

iCloud Backup

  • User-Optional
  • App’s Documents

directory gets backed up to iCloud

  • Put non-backup files in

Library/Caches

Friday, October 14, 11

slide-11
SLIDE 11

Storyboards

  • Define entire UI flow in
  • ne place
  • Scenes

a screen’s worth of content

  • Segues

transitions between scenes

Friday, October 14, 11

slide-12
SLIDE 12

Storyboards

  • UIMainStoryboardFile

in Info.plist

  • Controllers receive

prepareForSegue:send er:

  • Can also be presented

progammatically performSegueWithIden tifier:sender:

Friday, October 14, 11

slide-13
SLIDE 13

UIKit Customization

  • Appearance “proxy”
  • UIAppearance protocol
  • Modify default

appearance of visual

  • bjects

[[UINavigationBar appearance] setTintColor:[UIColor redColor]]; [[UIToolbar appearance] setBackgroundImage: [UIImage imageNamed:@"toolbar-bg-top"] forToolbarPosition:UIToolbarPositionTop barMetrics:UIBarMetricsDefault];

[[UIBarButtonItem appearanceWhenContainedIn:[UIToolbar class], nil] setTintColor:[UIColor redColor]];

Friday, October 14, 11

slide-14
SLIDE 14

UIKit Customization

  • UIActivityIndicatorView
  • color
  • UIBarButtonItem
  • backgroundImage
  • tintColor
  • backgroundVerticalPositionAdjustment
  • titlePositionAdjustment
  • backButtonBackgroundVerticalPosition

Adjustment

  • UIBarItem
  • titleTextAttributes
  • UINavigationBar
  • backgroundImage
  • titleTextAttributes
  • UIProgressView
  • progressTintColor
  • trackTintColor
  • progressImage
  • trackImage
  • UISearchBar
  • backgroundImage
  • scopeBarBackgroundImage
  • searchFieldBackgroundPositionAdjust

ment

  • scopeBarButtonDividerImage
  • scopeBarButtonTitleTextAttributes
  • etc., etc.

Friday, October 14, 11

slide-15
SLIDE 15

AirPlay

  • Display mirroring to Apple TV

(from iPad 2, iPhone 4S)

  • Second display
  • AVPlayer support:

airPlayVideoActive, allowsAirPlayVideo, usesAirPlayVideoWhileAirPlayScreenIsActive

  • Multimedia on

UIWebView

if ([[UIScreen screens] count] > 1) { UIScreen *externalScreen = [[UIScreen screens] objectAtIndex:1]; if (!externalScreen.mirroredScreen) { // Not mirroring, so show something different on this screen UIWindow *externalWindow = [[UIWindow alloc] initWithFrame:externalScreen.bounds]; externalWindow.screen = externalScreen; } }

Friday, October 14, 11

slide-16
SLIDE 16

ARC

  • Automatic Reference

Counting

  • Compiler-level
  • Goodbye retain,

release, autorelease, dealloc

  • Goodbye

NSAutoreleasePool

@autoreleasepool { NSString *blah = [NSString stringWithFormat:...]; : }

Friday, October 14, 11

slide-17
SLIDE 17

ARC

  • Zeroing weak references

@property (strong) UIWindow *window; @property (weak) id delegate;

Friday, October 14, 11

slide-18
SLIDE 18

Much, Much More...

  • Twitter framework
  • GLKit framework
  • Newsstand
  • CoreImage framework
  • Container view controllers
  • UIPageViewController

Friday, October 14, 11

slide-19
SLIDE 19

Dank je wel! Questions?

http://developer.apple.com/technologies/ios5/ http://developer.apple.com/library/ios/ #releasenotes/General/WhatsNewIniPhoneOS/ Articles/iOS5.html (bit.ly/nwyB99) http://developer.apple.com/icloud/

Vikram Kriplaney vikram@local.ch vikram@iphonso.com @krips

Friday, October 14, 11

slide-20
SLIDE 20

Thank you, Steve.

Friday, October 14, 11