xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.48k stars 514 forks source link

DispatchQueue lacks some features #18274

Open mikart143 opened 1 year ago

mikart143 commented 1 year ago

Steps to Reproduce

  1. Open DispatchQueue Xamarin source code
  2. Try find for example method Schedule
  3. Compare current implementation with documentation on: https://developer.apple.com/documentation/dispatch/dispatchqueue/3329232-schedule

Expected Behavior

Being able to invoke method Schedule from DispatchQueue

Actual Behavior

No implementation present for method Schedule in Dispatch Queue

Environment

Version information image

Build Logs

Example Project (If Possible)

rolfbjarne commented 1 year ago

It looks like the schedule methods are only available in Swift, and not Objective-C, which unfortunately means we can't bind them at the moment. I believe there are other DispatchQueue members which may serve a very similar purpose (DispatchQueue.DispatchAfter for instance) - is there any reason you need the Schedule methods in particular?

mikart143 commented 1 year ago

It is kinda annoying that they makes some stuff in Swift only even that they belong to the same class. No particular reason for Schedule, just learning about making apps for macOS and this is what came to me after googling. All I wanted to do was to execute code in intervals.