In other devices work and the dialogue appears for permission to access location (All devices iOS 7 and iOS 8), but the iPhone 5 with iOS 8.1 not appear that request permission.
Code request permission:
var versionString = UIDevice.currentDevice().systemVersion.stringByReplacingOccurrencesOfString(".", withString: "", options: NSStringCompareOptions.CaseInsensitiveSearch, range: nil) as NSString
if versionString.floatValue >= 800 {
if CLLocationManager.authorizationStatus() != CLAuthorizationStatus.Authorized && CLLocationManager.authorizationStatus() != CLAuthorizationStatus.AuthorizedWhenInUse {
if CLLocationManager.authorizationStatus() == CLAuthorizationStatus.Denied {
NSLog("Not Accepted")
} else {
locationManager.requestAlwaysAuthorization()
}
}
} else {
if CLLocationManager.authorizationStatus() == CLAuthorizationStatus.Denied {
NSLog("Not Accepted")
} else {
locationManager.startUpdatingLocation()
locationManager.stopUpdatingLocation()
}
}
The dialog of request not showing.
And declared on .plist NSLocationAlwaysUsageDescription type boolean and YES.