Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Apple's iOS documentation states that locationManager:didFailWithError: should be called if user denies location services to your app.
"If the user denies your application’s use of the location service, this method reports a kCLErrorDenied error. Upon receiving such an error, you should stop the location service."
MonoTouch is not calling CLLocationManager.MonitoringFailed() when location services are turn off for the app.
Run the attached sample project on your device. Turn off location services and notice that there is no console write.
Created attachment 838 [details]
You're using the wrong event.
"locationManager:didFailWithError:" maps to "Failed" while
"locationManager:monitoringDidFailForRegion:withError:" maps to "MonitoringFailed"
_manager.Failed += Handle_managerFailed;
void Handle_managerFailed (object sender, NSErrorEventArgs e)
Console.Write ("Location refused");
and it should works like expected.
Oh. Wow. I'm completely embarrassed now. Thank you.
no problem :)
Miguel's rosetta  is very helpful to find the "right" mapping between selectors and methods (if you know the former). MD code completion is nice but sometimes there's too many choice and similar names.
Created attachment 857 [details]
sample app #2
Ok. I think this is a legitimate bug this time. I have attached a new sample app #2 that has the suggested changes from Sebastien.
Steps to reproduce.
1. on iPhone, go to Settings > General > Reset > Reset Location Warnings
2. on iPhone go to Settings > Location Services > Turn it off completely for the phone just to be sure
3. build and deploy app
4. when prompted to turn on location services hit "Cancel"
5. verify that nothing gets printed to console
If the bug doesn't present itself the first time, uninstall, then reinstall the app. Follow the steps again.
Andrew, this bug is closed and won't show on anyone's radar (except mine since I'm on c.c.).
Please always open a new bug report unless you're 100% sure it's a regression (same test case, same error, new version). Thanks!