Bug 4929 - NSUrlConnection::Schedule does not work
Summary: NSUrlConnection::Schedule does not work
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.2
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-05-07 13:52 UTC by Jackson Harper
Modified: 2012-05-08 09:12 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 Jackson Harper 2012-05-07 13:52:19 UTC
I put an obj-c and a MT project on github, that are basically the same thing. Attempting to upload a blob of data using NSUrlConnection::sendAsync 

For some reason on the MT project, if I set the runMode the URL connection never connects, commenting out the line that sets the runMode makes the connection work.

Project found here:

Important part here:

NSUrlConnection isn't in maccore, so I can't tell if  its just a binding issue.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-05-07 16:05:36 UTC
It is in maccore:


The selector looks ok, but it might be that it has to take the exact NSString reference instead of another NSString with the same value.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-05-07 16:09:07 UTC
That's actually it, this works:

Messaging.void_objc_msgSend_IntPtr_IntPtr (url_connection.Handle, new Selector ("scheduleInRunLoop:forMode:").Handle, NSRunLoop.Current.Handle, NSRunLoop.NSRunLoopCommonModes.Handle);
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-05-07 18:42:24 UTC
Fixed (monotouch master: 89d837f). It will be included in 5.3.4.

Comment #2 provides a workaround until the fix has been released.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2012-05-08 09:12:05 UTC
The fix has been put in the 5.2-series branch too, so it will be included in 5.2.12.