new what's new in ios 5?gotocon.com/dl/goto-amsterdam-2011/slides/vikramkrip... · 2011. 10....

20
What's new in iOS 5? (and why should I care?) Vikram Kriplaney [email protected] [email protected] @krips Friday, October 14, 11

Upload: others

Post on 24-Sep-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

What's new in iOS 5?(and why should I care?)

Vikram [email protected]@iphonso.com@krips

Friday, October 14, 11

Page 2: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

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

Page 3: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

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

Page 4: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

iCloud Metadata

• Metadata is always synced with iCloud

• Devices always push

• Devices pull when appropriate

Friday, October 14, 11

Page 5: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

iCloud Storage API

• NSFileManager

• NSMetadataQuery

• UIDocument

• Key-Value Store

• Windows API (really)

Friday, October 14, 11

Page 6: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

NSFileManager• Move files into sandbox

• Check if file exists in iCloud

• Locate sandbox directory

• Publish a URL for sharing

Friday, October 14, 11

Page 7: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

UIDocument• Asynchronous reading

and writing

• Coordinated iCloud I/O

• Conflict detection and resolution

• Safe (atomic) saving

• Auto-save

Friday, October 14, 11

Page 8: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

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

Page 9: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

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:selfselector:@selector(kvStoreChanged:) name: NSUbiquitousKeyValueStoreDidChangeExternallyNotification object:nil];

Friday, October 14, 11

Page 10: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

iCloud Backup

• User-Optional

• App’s Documents directory gets backed up to iCloud

• Put non-backup files in Library/Caches

Friday, October 14, 11

Page 11: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

Storyboards

• Define entire UI flow in one place

• Scenesa screen’s worth of content

•Seguestransitions between scenes

Friday, October 14, 11

Page 12: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

Storyboards• UIMainStoryboardFile

in Info.plist

• Controllers receive prepareForSegue:sender:

• Can also be presented progammatically performSegueWithIdentifier:sender:

Friday, October 14, 11

Page 13: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

UIKit Customization• Appearance “proxy”

• UIAppearance protocol

• Modify default appearance of visual objects

[[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

Page 14: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

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

Page 15: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

AirPlay • Display mirroring to Apple TV(from iPad 2, iPhone 4S)

• Second display

• AVPlayer support:airPlayVideoActive, allowsAirPlayVideo,usesAirPlayVideoWhileAirPlayScreenIsActive

• Multimedia onUIWebView

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

Page 16: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

ARC• Automatic Reference

Counting

• Compiler-level

• Goodbye retain, release, autorelease, dealloc

• Goodbye NSAutoreleasePool

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

Friday, October 14, 11

Page 17: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

ARC• Zeroing weak references

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

Friday, October 14, 11

Page 18: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

Much, Much More...• Twitter framework

• GLKit framework

• Newsstand

• CoreImage framework

• Container view controllers

• UIPageViewController

Friday, October 14, 11

Page 20: New What's new in iOS 5?gotocon.com/dl/goto-amsterdam-2011/slides/VikramKrip... · 2011. 10. 15. · What's new in iOS 5? (and why should I care?) Vikram Kriplaney vikram@local.ch

Thank you, Steve.

Friday, October 14, 11