Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iPhone 5 and You! by Ameir Al-Zoubi

iPhone 5 and You! by Ameir Al-Zoubi

Ameir discusses upgrading your app to support iPhone 5 at CocoaHeads September in Durham

F13b7ea691e49d2cb953e10317f21976?s=128

Triangle Cocoa

September 27, 2012
Tweet

Transcript

  1. The iPhone 5 and You! Tall is the new retina.

  2. Not The Time To Procrastinate

  3. Not The Time To Procrastinate • Early adopters tend to

    pay for apps
  4. Not The Time To Procrastinate • Early adopters tend to

    pay for apps • Avoid the one star downvotes
  5. Not The Time To Procrastinate • Early adopters tend to

    pay for apps • Avoid the one star downvotes • It’s what Steve would have wanted
  6. The Letterbox

  7. The Letterbox • Include a new Default.png named Default-568h@2x.png

  8. The Letterbox • Include a new Default.png named Default-568h@2x.png •

    Needs to be 640 × 1136 pixels
  9. The Letterbox • Include a new Default.png named Default-568h@2x.png •

    Needs to be 640 × 1136 pixels • Thats it.
  10. But Wait! My App is Broken!

  11. But Wait! My App is Broken! • Xcode 4.5

  12. But Wait! My App is Broken! • Xcode 4.5 •

    iOS 6
  13. But Wait! My App is Broken! • Xcode 4.5 •

    iOS 6 • armV7s
  14. The Window

  15. The Window • Full screen at launch

  16. The Window • Full screen at launch

  17. The Window • Full screen at launch

  18. The Window • self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    • Full screen at launch
  19. The Window • self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];

    • Set root view controller • Full screen at launch
  20. Rotation

  21. Rotation • If all views rotate the same way, simply

    set those in your plist
  22. Rotation • If all views rotate the same way, simply

    set those in your plist • shouldAutorotateToInterfaceOrientation
  23. Rotation • If all views rotate the same way, simply

    set those in your plist • shouldAutorotateToInterfaceOrientation • supportedInterfaceOrientations
  24. Rotation • If all views rotate the same way, simply

    set those in your plist • shouldAutorotateToInterfaceOrientation • supportedInterfaceOrientations • Checks the root view controller
  25. Rotation • If all views rotate the same way, simply

    set those in your plist • shouldAutorotateToInterfaceOrientation • supportedInterfaceOrientations • Checks the root view controller • Subclass UINavigationController and UITabBarController
  26. Auto Layout

  27. Auto Layout • It’s the bee’s knees

  28. Auto Layout • It’s the bee’s knees • iOS 6

    only
  29. Auto Layout • It’s the bee’s knees • iOS 6

    only • New xibs have it enabled by default
  30. The Hard Way

  31. The Hard Way • UIViewAutoresizingFlexibleHeight

  32. The Hard Way • UIViewAutoresizingFlexibleHeight • Resize will occur in

    viewWillAppear not viewDidLoad
  33. The Hard Way • UIViewAutoresizingFlexibleHeight • Resize will occur in

    viewWillAppear not viewDidLoad • ([[UIScreen mainScreen] bounds].size.height == 568)
  34. The Hard Way • UIViewAutoresizingFlexibleHeight • Resize will occur in

    viewWillAppear not viewDidLoad • ([[UIScreen mainScreen] bounds].size.height == 568) • New ratio
  35. The Hard Way • UIViewAutoresizingFlexibleHeight • Resize will occur in

    viewWillAppear not viewDidLoad • ([[UIScreen mainScreen] bounds].size.height == 568) • New ratio • CGRectIntegral
  36. The March of Progress

  37. The March of Progress • iPhone 5 supports the armV7s

    instruction set
  38. The March of Progress • iPhone 5 supports the armV7s

    instruction set • Most statically compiled frameworks don’t
  39. The March of Progress • iPhone 5 supports the armV7s

    instruction set • Most statically compiled frameworks don’t • lipo -info binaryFile
  40. The March of Progress • iPhone 5 supports the armV7s

    instruction set • Most statically compiled frameworks don’t • lipo -info binaryFile • armV6 support dropped
  41. The March of Progress • iPhone 5 supports the armV7s

    instruction set • Most statically compiled frameworks don’t • lipo -info binaryFile • armV6 support dropped • iOS 4.3 and up
  42. View Life Cycle • viewDidUnload and viewWillUnload no longer called

    • didReceiveMemoryWarning • Don’t release your view
  43. None
  44. Maps

  45. Maps • Simply replace http://maps.google.com with http://maps.apple.com

  46. Maps • Simply replace http://maps.google.com with http://maps.apple.com • Backwards compatible

  47. The Light at the End of the Tunnel

  48. The Light at the End of the Tunnel • UIActivityViewController

  49. The Light at the End of the Tunnel • UIActivityViewController

    • UICollectionView
  50. The Light at the End of the Tunnel • UIActivityViewController

    • UICollectionView • NSAttributedString
  51. The Light at the End of the Tunnel • UIActivityViewController

    • UICollectionView • NSAttributedString • UIRefreshControl
  52. The Light at the End of the Tunnel • UIActivityViewController

    • UICollectionView • NSAttributedString • UIRefreshControl • Lots more
  53. More Info • Twitter: @ameir • NSCoder