Skip to content

Problem with RestSharp on MAUI on iOS platform #1984

Description

@zuzannaczaja

To Reproduce
I try run app on iOS local device. And Unfortunately I have this error:

[0:] An error occurred: 'Operation is not supported on this platform.'. Callstack: ' at System.Net.Http.NSUrlSessionHandler.set_Proxy(IWebProxy value)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of stack trace from previous location ---
at System.Net.Http.HttpClientHandler.InvokeNativeHandlerMethod(String name, Object[] parameters)
at System.Net.Http.HttpClientHandler.SetProxy(IWebProxy value)
at System.Net.Http.HttpClientHandler.set_Proxy(IWebProxy value)
at RestSharp.RestClient.ConfigureHttpMessageHandler(HttpClientHandler handler)
at RestSharp.RestClient..ctor(RestClientOptions options, Action`1 configureDefaultHeaders)
at RestSharp.RestClient..ctor(Uri baseUrl)
at RestSharp.RestClient..ctor(String baseUrl)

Expected behavior
App should run.

Desktop:
OS: Windows
Visual Studio Enterprise 2022 Preview 17.5.0 Preview 2.0
Version 7.0.101
App version: .NET 6
I try run on iOS platform on local device

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions