Updated iOS example for iOS 8 and Xcode 6