Bug 21078 - ModernHttpClient latest one is not working for iOS6.x
Summary: ModernHttpClient latest one is not working for iOS6.x
Status: RESOLVED INVALID
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: master
Hardware: PC Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-03 04:31 UTC by Mustafa Shaik
Modified: 2014-07-03 10:37 UTC (History)
3 users (show)

Tags:
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:
Status:
RESOLVED INVALID

Description Mustafa Shaik 2014-07-03 04:31:33 UTC
I am consuming latest version of ModernHttpClient (2.0.1.0) and its crashing on iOS6.1 emulator. I copied the stack trace too. It clearly states that some issue with NSUrlSession and NSUrlSession is available ios7 and above. Is there any work around for this or any other alternate dll that supports starting from iOS5 and later.

Trace Logs: 

System.ArgumentNullException: Argument cannot be null.
Parameter name: configuration
  at MonoTouch.Foundation.NSUrlSession.FromWeakConfiguration (MonoTouch.Foundation.NSUrlSessionConfiguration configuration, MonoTouch.Foundation.NSObject weakDelegate, MonoTouch.Foundation.NSOperationQueue delegateQueue) [0x00006] in /Developer/MonoTouch/Source/monotouch/src/build/compat/Foundation/NSUrlSession.g.cs:677
  at MonoTouch.Foundation.NSUrlSession.FromConfiguration (MonoTouch.Foundation.NSUrlSessionConfiguration configuration, MonoTouch.Foundation.NSUrlSessionDelegate sessionDelegate, MonoTouch.Foundation.NSOperationQueue delegateQueue) [0x00000] in /Developer/MonoTouch/Source/monotouch/src/build/compat/Foundation/NSUrlSession.g.cs:669
  at ModernHttpClient.NativeMessageHandler..ctor (Boolean throwOnCaptiveNetwork) [0x0001c] in /Users/paul/code/paulcbetts/ModernHttpClient/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs:38
  at ModernHttpClient.NativeMessageHandler..ctor () [0x00000] in /Users/paul/code/paulcbetts/ModernHttpClient/src/ModernHttpClient/iOS/NSUrlSessionHandler.cs:35
  at ....

Regards
mustafa
Comment 1 Sebastien Pouliot 2014-07-03 10:37:20 UTC
NSURLSession is only available in iOS 7.0+. The only workarounds are to

* require iOS 7+ for your application(s); or

* use something else, like:

(a) try the CFNetwork backend of HttpClient that ships with Xamarin.iOS [1];

or

(b) contact the ModernHttpClient author [2] to see if older versions did not require NSURLSession (I do not recall).


[1] http://tirania.org/monomac//archive/2013/Jun.html
[2] http://blog.paulbetts.org/