Updated for Xcode 6.0.1

Updated the code for latest iOS 8 release.
Updated the code to use requestWhenInUseAuthorization