Bug 17267 - NSManagedObject.ValidateValue method signature is wrong
Summary: NSManagedObject.ValidateValue method signature is wrong
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 7.2.1
Assignee: Bugzilla
Depends on:
Reported: 2014-01-16 03:04 UTC by Nick Rymanov
Modified: 2014-03-20 10:18 UTC (History)
3 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 Nick Rymanov 2014-01-16 03:04:18 UTC
Currently the method signature is:

public virtual bool ValidateValue(NSObject value, string key, out NSError error)

It should be:
// -(BOOL)validateName:(id *)ioValue error:(NSError * __autoreleasing *)outError
public virtual bool ValidateValue(ref NSObject value, string key, out NSError error)

See Apple documentation for more detais:
Comment 1 Sebastien Pouliot 2014-01-16 08:20:31 UTC
You're right the existing signature is wrong.
Fixed in maccore/0838d3d8bd54a5c65c50474bab5d66ccf24adaa0
Comment 2 Ram Chandra 2014-03-20 10:18:21 UTC
I have checked this issue on following builds:

Xamarin Studio : 4.2.4 (build 32)
Xamarin.iOS : (Trial Edition)
Build Information
Release ID: 402040032
Git revision: a160c35dac9ab9fd32eeadaa171216316d5a5133
Build date: 2014-03-12 13:55:08-04
Xamarin addins: a779416ceabd54981ce812771a4061c942e8b872

I have checked the signature of "ValidateValue()" method in "assembly browser" and I observed that now the signature of "ValidateValue()" method is correct . The signature of ValidateValue()" method is following: 

public virtual bool ValidateValue (ref NSObject value, string key, out NSError error)


It is according to the apple documentation.

screencast:  http://www.screencast.com/t/8vCEPE6xKgjC

This issue is working fine. As of now, I am closing this issue.

I also observed that the new signature of  "ValidateValue()" method is not updated into "Xamarin	Developer Center" API section (http://iosapi.xamarin.com/index.aspx?link=M%3AMonoTouch.CoreData.NSManagedObject.ValidateValue(MonoTouch.Foundation.NSObject%2CSystem.String%2CMonoTouch.Foundation.NSError%40)). 

Please update this also.