what s new in ios 5
play

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


  1. What's new in iOS 5? (and why should I care?) vikram@local.ch Vikram Kriplaney vikram@iphonso.com @krips Friday, October 14, 11

  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

  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

  4. iCloud Metadata • Metadata is always synced with iCloud • Devices always push • Devices pull when appropriate Friday, October 14, 11

  5. iCloud Storage API • NSFileManager • NSMetadataQuery • UIDocument • Key-Value Store • Windows API (really) Friday, October 14, 11

  6. NSFileManager • Move files into sandbox • Check if file exists in iCloud • Locate sandbox directory • Publish a URL for sharing Friday, October 14, 11

  7. UIDocument • Asynchronous reading and writing • Coordinated iCloud I/O • Conflict detection and resolution • Safe (atomic) saving • Auto-save Friday, October 14, 11

  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

  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 object:nil]; Friday, October 14, 11

  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

  11. Storyboards • Define entire UI flow in one place • Scenes a screen’s worth of content •Segues transitions between scenes Friday, October 14, 11

  12. Storyboards • UIMainStoryboardFile in Info.plist • Controllers receive prepareForSegue:send er: • Can also be presented progammatically performSegueWithIden tifier:sender: Friday, October 14, 11

  13. UIKit Customization • Modify default • Appearance “proxy” appearance of visual • UIAppearance protocol 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

  14. UIKit Customization • UIActivityIndicatorView • UIProgressView • color • progressTintColor • UIBarButtonItem • trackTintColor • backgroundImage • progressImage • tintColor • trackImage • backgroundVerticalPositionAdjustment • UISearchBar • titlePositionAdjustment • backgroundImage • backButtonBackgroundVerticalPosition • scopeBarBackgroundImage Adjustment • searchFieldBackgroundPositionAdjust • UIBarItem ment • titleTextAttributes • scopeBarButtonDividerImage • UINavigationBar • scopeBarButtonTitleTextAttributes • backgroundImage • etc., etc. • titleTextAttributes Friday, October 14, 11

  15. • Display mirroring to Apple TV AirPlay (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

  16. ARC • Automatic Reference Counting • Compiler-level • Goodbye retain, release, autorelease, dealloc • Goodbye NSAutoreleasePool @autoreleasepool { NSString *blah = [NSString stringWithFormat:...]; : } Friday, October 14, 11

  17. ARC • Zeroing weak references @property (strong) UIWindow *window; @property (weak) id delegate; Friday, October 14, 11

  18. Much, Much More... • Twitter framework • GLKit framework • Newsstand • CoreImage framework • Container view controllers • UIPageViewController Friday, October 14, 11

  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@local.ch Vikram Kriplaney vikram@iphonso.com @krips Friday, October 14, 11

  20. Thank you, Steve. Friday, October 14, 11

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend