Code updates for iOS 6 deprecation.