Bug 5772 - EKEventStore.RemoveEvent binding appears broken in iOS: 4.2.1, works fine in iOS 5.1.1
Summary: EKEventStore.RemoveEvent binding appears broken in iOS: 4.2.1, works fine in ...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-06-20 08:03 UTC by John Hair
Modified: 2012-06-20 08:37 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:

Description John Hair 2012-06-20 08:03:21 UTC
Here is the relevant part of the callstack. The exact same code works fine on my iPhone 4 running iOS 5.1.1.

iOS Version: 4.2.1
Hardware Version: iPhone3G
Exception Log
Message: Objective-C exception thrown.  Name: NSInvalidArgumentException Reason: -[EKEventStore removeEvent:span:commit:error:]: unrecognized selector sent to instance 0x11720b0
Stack trace:  at MonoTouch.EventKit.EKEventStore.RemoveEvent (MonoTouch.EventKit.EKEvent ekEvent, EKSpan span, Boolean commit, MonoTouch.Foundation.NSError& error) [0x0002a] in /Developer/MonoTouch/Source/monotouch/src/EventKit/EKEventStore.g.cs:322 

Installation UUID: 6aed251f-af30-444e-a61d-f437a0862e87
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (
	Package version: 210090011
Apple Developer Tools:
	 Xcode 4.3.2 (1177)
	 Build 4E2002
Monotouch: 5.2.12
Comment 1 Sebastien Pouliot 2012-06-20 08:14:53 UTC
from Apple documentation [1] 

Available in iOS 5.0 and later.

Available in iOS 4.0 and later.

In MonoTouch the later one maps to:

bool RemoveEvents (EKEvent theEvent, EKSpan span, out NSError error);

[1] http://developer.apple.com/library/ios/#documentation/EventKit/Reference/EKEventStoreClassRef/Reference/Reference.html
Comment 2 John Hair 2012-06-20 08:21:58 UTC
Thanks Sebastien, I can work with that but I now have to if() my code rather than run a method that depreciates gracefully.

No matter, Ive had to do that in a few other places, whats one more. :)
Comment 3 John Hair 2012-06-20 08:32:04 UTC
Also, this would be another example of the usefulness of compiler warnings when using iOS5 specific calls when targeting older frameworks. I raised that as another request I think.
Comment 4 Sebastien Pouliot 2012-06-20 08:37:38 UTC
Agreed. I can confirm that this is part of the enhancement request we have filled but, right now, there's no date/release set for this feature.