Thursday 26 September 2013


iOS 6.1 to iOS 7.0 API Differences

Deprecated APIs in iOS7

From time to time, Apple adds deprecation macros to APIs to indicate that those APIs should no longer be used in active development. When a deprecation occurs, it is not an immediate end-of-life to the specified API. Instead, it is the beginning of a grace period for transitioning off that API and onto newer and more modern replacements. Deprecated APIs typically remain present and usable in the system for a reasonable amount of time past the release in which they were deprecated. However, active development on them ceases and the APIs receive only minor changes—to accommodate security patches or to fix other critical bugs. Deprecated APIs may be removed entirely from a future version of the operating system.

As a developer, it is important that you avoid using deprecated APIs in your code as soon as possible. At a minimum, new code you write should never use deprecated APIs. And if you have existing code that uses deprecated APIs, update that code as soon as possible. Fortunately, the compiler generates warnings whenever it spots the use of a deprecated API in your code, and you can use those warnings to track down and remove all references to those APIs.
This release includes deprecations in the following technology areas:
  • The Map Kit framework includes deprecations for the MKOverlayView class and its various subclasses. The existing overlay views have been replaced with an updated set of overlay renderer objects that descend from the MKOverlayRenderer class. For more information about the classes of this framework, see Map Kit Framework Reference.
  • The Audio Session API in the Audio Toolbox framework is deprecated. Apps should use the AVAudioSession class in the AV Foundation framework instead.
  • The CLRegion class in the Core Location framework is replaced by the CLCircularRegion class. The CLRegion class continues to exist as an abstract base class that supports both geographic and beacon regions.
  • The UUID property of the CBCentral class is deprecated. To specify the unique ID of your central objects, use the identifier property instead.
  • The Game Kit framework contains assorted deprecations intended to clean up the existing API and provide better support for new features.
  • The UIKit framework contains the following deprecations:
    • The wantsFullScreenLayout property of UIViewController is deprecated. In iOS 7 and later, view controllers always support full screen layout.
    • UIColor objects that provided background textures for earlier versions of iOS are gone.
    • Many drawing additions to the NSString class are deprecated in favor of newer variants.
  • The gethostuuid function in the libsyscall library is deprecated.
  • In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendorproperty of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using the advertisingIdentifier property of ASIdentifierManagerinstead.)

Added frameworks:

  • GameController
  • JavaScriptCore
  • MediaAccessibility
  • MultipeerConnectivity
  • SafariServices
  • SpriteKit

Wednesday 25 September 2013


iOS 7 Design Resources


iOS 7 introduces many UI changes, such as borderless buttons, translucent bars, and full-screen layout for view controllers. Using Xcode 5, you can build a project for iOS 7 and run it in iOS 7 Simulator to get a first glimpse of the way the app looks with iOS 7 UI.
For example, the only differences between the two versions of TheElements sample project shown below are the deployment target and the simulator.
TheElements sample app in iOS 7 Simulator
image: ../Art/first_look_7_2x.png
TheElements sample app in iOS 6 Simulator
image: ../Art/first_look_6_2x.png
It’s tempting to dive straight into the work of updating your app, but there are a few things to think about before beginning the process.
As you interact with the built-in apps, it becomes clear that the changes in iOS 7 are both subtle and profound. Familiar UI elements are easily recognizable but look very different. Visual touches of physicality and realism are muted and refined, while realism in motion is enhanced.

Scoping the Project

Knowing your app’s compatibility requirements and customization characteristics gives you some idea of the path to take. Use the following checklists to fill in more details and to scope the project.

Things Every App Must Do

  • Update the app icon.
    In iOS 7, app icons for high-resolution iPhone and iPod touch are 120 x 120 pixels; for high-resolution iPad, app icons are 152 x 152 pixels. (To learn more about all icon sizes, see “Icon and Image Sizes”.)
    Note that iOS 7 doesn’t apply shine or a drop shadow to the app icon. And, although iOS 7 still applies a mask that rounds the corners of an app icon, it uses a different corner radius than earlier versions of iOS.
  • Update the launch image to include the status bar area if it doesn’t already do so.
  • Support Retina display and iPhone 5 in all your artwork and designs, if you’re not already doing so.

Things Every App Should Do

  • Redesign custom bar button icons. In iOS 7, bar button icons are lighter in weight and have a different style. For some design guidance, see “Bar Button Icons”.
  • Prepare for borderless buttons by reassessing the utility of button background images and bezels in your layout.
  • Examine your app for hard-coded UI values—such as sizes and positions—and replace them with those you derive dynamically from system-provided values. Use Auto Layout to help your app respond when layout changes are required. (If you’re new to Auto Layout, learn about it by readingAuto Layout Guide.)
  • Examine your app for places where the metrics and style changes of UIKit controls and views affect the layout and appearance. For example, switches are wider, grouped tables are no longer inset, and progress views are thinner. For more information on specific UI elements, see Bars and Bar Buttons,Content ViewsControls, and Temporary Views.
  • Adopt Dynamic Type. In iOS 7, users can adjust the text size they see in apps. When you adopt Dynamic Type, you get text that responds appropriately to user-specified size changes. For more information, see Using Fonts.
  • Expect users to swipe up from the bottom of the screen to reveal Control Center. If iOS determines that a touch that begins at the bottom of the screen should reveal Control Center, it doesn’t deliver the gesture to the currently running app. If iOS determines that the touch should not reveal Control Center, the touch may be slightly delayed before it reaches the app.
  • Revisit the use of drop shadows, gradients, and bezels. Because the iOS 7 aesthetic is smooth and layered—with much less emphasis on using visual effects to make UI elements look physical—you may want to rethink these effects.
  • If necessary, update your app to best practices for iOS 6—such as Auto Layout and storyboards—and ensure that the app doesn’t use deprecated APIs.
Now that you have a better idea of the types of things you need to do, learn more about changes in view controllers, tinting, and fonts by reading Appearance and Behavior.