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.
Created attachment 5092 [details]
Sample project that reproduces the problem
When compiling the attached project, I get the following error :
"<path>/BindingTests/obj/Debug/ios/ObjCRuntime/Trampolines.g.cs(12,12): Error CS0029: Cannot implicitly convert type `System.IntPtr' to `MonoTouch.Foundation.NSObject' (CS0029) (BindingTests)"
It was working under Xamarin.iOS 188.8.131.52 but doesn't work anymore under Xamarin.iOS 184.108.40.206. The project compile if I changed the returned type of "MyBlockToBind" to void or if the parameter of "MyBlockToBind" isn't an array...
That's likely related to the introduction, in 7.0, of the new [BlockCallback] attribute . What does the native side definition looks like?
typedef id (^MyBlockToBind)(NSArray* keys);
- (void) testMethodBlock: (MyBlockToBind)myBlockToBind;
I still get the same compilation error when i add the [BlockCallback] attribute :
void TestMethod ([BlockCallback] MyBlockToBind myBlockToBind);