Bug 18173 - Declaration of NSFetchedResultsControllerDelegate.DidChangeSection method is wrong
Summary: Declaration of NSFetchedResultsControllerDelegate.DidChangeSection method is ...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 7.2.1
Assignee: Bugzilla
Depends on:
Reported: 2014-03-04 23:39 UTC by Nick Rymanov
Modified: 2014-03-20 09:06 UTC (History)
4 users (show)

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

Test project (14.55 KB, application/zip)
2014-03-06 04:10 UTC, Nick Rymanov

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 Nick Rymanov 2014-03-04 23:39:12 UTC
Current declaration
public virtual void DidChangeSection(NSFetchedResultsController controller, NSFetchedResultsSectionInfo sectionInfo, uint sectionIndex, NSFetchedResultsChangeType type)

should be 
public virtual void DidChangeSection(NSFetchedResultsController controller, INSFetchedResultsSectionInfo sectionInfo, uint sectionIndex, NSFetchedResultsChangeType type)
Comment 1 Sadik Ali 2014-03-05 01:38:36 UTC
I have checked this and noticed that below is declaration of "NSFetchedResultsControllerDelegate.DidChangeSection" method 

public virtual void DidChangeSection (NSFetchedResultsController controller, NSFetchedResultsSectionInfo sectionInfo, uint sectionIndex, NSFetchedResultsChangeType type)

Refer screen cast: http://screencast.com/t/UumkKteIcsWm 

Checked with:

XS 4.2.3 (Build 59)
Xamarin.iOS :
Comment 2 Sebastien Pouliot 2014-03-05 08:40:52 UTC
@Nick this is a breaking change and we avoid them when possible (most of the time) but I think the current delegate might not work (from a previous similar regarding NSFetchedResultsSectionInfo*).

* is was bound before we had the [Protocol] support that provide the I* interfaces.

Can you provide us with a self-contained test case using the API ?
Comment 3 Nick Rymanov 2014-03-06 04:10:12 UTC
Created attachment 6242 [details]
Test project

INHO, It is not a breaking change because noone can use this functionality. As soon as you start using it you will discover that it just doesn't work and you can't do anything with it. It seems that you never ever tryed to use this functionality.
Comment 4 Sebastien Pouliot 2014-03-06 09:17:07 UTC
Thanks for providing a test case. I see you found a workaround using the weak delegate.

The "breaking change" definition is based on .NET definition - i.e. can an existing (binary) assembly, with a reference to an old monotouch.dll, still works if we update monotouch.dll. This is extremely important for component (vendors and consumers). And yes sometime unusable code gets "caught" being (partially) used (e.g. implementing an interface but the method is never called).

Still we do make exceptions when an API was unusable. This was done for an earlier issue wrt [I]NSFetchedResultsSectionInfo but it seems this API was missed. I'll review for other CoreData API using this type (from a quick look it seems to be the only one).

For some reasons* CoreData is not used very often by .NET developers. There might be more bugs than usual inside the part of the class library.

* the main one being it's not a cross-platform feature, so code cannot be reused in Android or Windows[.Phone] (but can be reused for OSX with Xamarin.Mac).
Comment 5 Sebastien Pouliot 2014-03-06 22:02:11 UTC
Fixed in master / c197d63c63dab287dfde47858b3cd083e0380add
Comment 6 Shruti 2014-03-20 08:37:13 UTC
I have checked this in method declaration of System.Core assembly. This has been fixed.

Screen Cast Info :

Environment Info:
XS 4.2.4 (build 32) 

Hence closing this issue.
Comment 7 Sebastien Pouliot 2014-03-20 08:41:42 UTC
> System.Core assembly

That change is located in monotouch,dll - howver your screencast points to monotouch.dll, so I assume you confused CoreData (namespace) with Stysrem.Core (assembly) while writing the above description.
Comment 8 Shruti 2014-03-20 09:06:10 UTC
Yes, I have checked in monotouch.dll. I apologize for incorrect syntax.