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.
I am often receiving an ArgumentNullException for cases where the Apple docs clearly allow null/nil values.
Could you do a review of the monotouch classes and remove those null checks?
I only remember the last two examples:
Unhandled managed exception: Argument cannot be null.
Parameter name: value (System.ArgumentNullException)
at MonoTouch.UIKit.UILocalNotification.set_SoundName (System.String value) [0x00059] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UILocalNotification.g.cs:377
The name of the file containing the sound to play when an alert is displayed. [...] The default value is nil (no sound).
If I remember correctly the same issue applies to MKAnnotationView leftCalloutAccessoryView, docs:
[...] The default value of this property is nil.
Fixed UILocalNotification and MKAnnotationView.
monotouch/master: fc7ea5c50224a80ec4f916b54fd7cc5a9ffbd6bd and c62808abadcd3e58aa28025fcd258b4246a8a0a4
We're going through the API to find these cases, but it's a long process (note that we can't trust the documentation (every now and then we find out Apple's docs are wrong about something), so we have to right test cases for every single property).
If you find any other cases in the meantime, please just file a bug here with the name of the class and the selector, and we'll have a look.
I have checked this issue on following builds:
Xamarin Studio : 4.2.4 (build 32)
Xamarin.iOS : 220.127.116.11 (Trial Edition)
Release ID: 402040032
Git revision: a160c35dac9ab9fd32eeadaa171216316d5a5133
Build date: 2014-03-12 13:55:08-04
Xamarin addins: a779416ceabd54981ce812771a4061c942e8b872
I observed that now I am able to assign "null" value to the "set" accessor of "SoundName" properties of "UILocalNotification" class and "LeftCalloutAccessoryView" property of "MKAnnotationView" class and I have not got ArgumentNullException. I have also observed the signature of "SoundName" and "LeftCalloutAccessoryView" property is updated and removed extra null check from both the property in latest build i.e. x.iOS 18.104.22.168
This issue is working fine. Hence, I am closing this issue.