Forum Libraries, Components, and Plugins

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Binding COVID library, bridging functions headers in swift to objective c understand

Hi!

I'm trying to bind the lib DP-3T for Xamarin.iOS (it's in GitHub but I can't put links here). I've problems with some functions that they use callbacks like:

public func sync(completionBlock: ((Result<Void, DP3TTracingError>) -> Void)? )

or enums with different params like:

public enum DP3TNetworkingError : Error {

        case networkSessionError(error: Error)
        case notHTTPResponse
        case HTTPFailureResponse(status: Int)
    ...

that I don't know how to represent in swift that objc can understand. Anyone has ideas or examples of how to convert this type of objects to something that objective-c understand?

Thanks.

Sign In or Register to comment.