CLLocationManager significantLocationChangeMonitoringAvailable should return NO if no cell radio is unavailable
| Originator: | cchamb | ||
| Number: | rdar://15198100 | Date Originated: | 2013-10-10 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7.0 |
| Classification: | Other Bug | Reproducible: | Always |
The CLLocationManager reference document says significant location change monitoring "is available only in iOS 4.0 and later and requires a device with a cellular radio."
Therefore on a device without a cellular radio, like my iPad 2, significantLocationChangeMonitoringAvailable should return NO. Instead it returns YES.
Returning YES when it shouldn't means code like this won't work:
if ([CLLocationManager significantLocationChangeMonitoringAvailable]) {
[clManager startMonitoringSignificantLocationChanges];
...
}
When I run above code on my Wi-Fi-only iPad 2, there are no errors. Worse, the delegate methods to notify me that a new location is available are never invoked. It just fails silently.
Steps to Reproduce:
1. install XCode
2. create a new project for iPad or a universal app
3. add the CoreLocation framework
4. create a view controller and import CoreLocation header
5. observe [CLLocationManager significantLocationChangeMonitoringAvailble] will return YES regardless of there being no cell radio available
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!