Updated for iOS 8 platform